Add credits

This commit is contained in:
Mario Martínez 2024-10-15 17:28:16 +02:00
parent f4e2193219
commit b0e030e699
7 changed files with 243 additions and 10 deletions

View file

@ -70,7 +70,7 @@ script = ExtResource("1_uoty8")
time = 2.01667
[resource]
resource_name = "reed_loses_sfw"
resource_name = "reed_loses"
script = ExtResource("3_kh4kq")
commands = Array[Resource("res://Scripts/Cutscenes/Commands/base.gd")]([SubResource("Resource_j0qrl"), SubResource("Resource_46i1x"), SubResource("Resource_w88ia"), SubResource("Resource_dxa8x"), SubResource("Resource_uu88j"), SubResource("Resource_qs5xn"), SubResource("Resource_qkt15"), SubResource("Resource_12o2v"), SubResource("Resource_uw5p1")])
auto_start_on_load = true

View file

@ -9,8 +9,10 @@ extends Node2D
@onready var nem_npc = $NemNPC
@onready var cutscene_manager = $CutsceneManager
@onready var sound_manager = $SoundManager
@onready var fader_animation = $TextboxUI/Control/FaderRect/AnimationPlayer
@onready var fader_animation = $Fades/Control/FaderRect/AnimationPlayer
@onready var barrier = $Barrier
@onready var credits = $Fades/Control/Credits
@onready var reward = $Fades/Control/NSFWReward
@export var stage = 1
@ -57,7 +59,18 @@ func _on_cutscene_finished(cutscene_name: String):
reed_ai.set_ai_enabled(true)
battle_ui.set_enemy_health_visible(true)
barrier.process_mode = Node.PROCESS_MODE_INHERIT
elif cutscene_name == "reed_loses":
if player.health == player.max_health and Globals.nsfw:
reward.visible = true
fader_animation.play("fade_in_black")
fader_animation.animation_finished.connect(_show_credits, CONNECT_ONE_SHOT)
else:
_show_credits("")
player.in_cutscene = true
func _show_credits(_anim_name: StringName):
credits.visible = true
credits.reveal(player.health == player.max_health)
func _on_cutscene_manager_issued_command(command: CutsceneCommand, manager: CutsceneManager):
if command is TurnCharacterCommand or command is LookAtTargetCommand:
@ -122,7 +135,7 @@ func _on_cutscene_manager_issued_command(command: CutsceneCommand, manager: Cuts
func _on_player_interacted_with_object(object: Node, interaction: Cutscene):
cutscene_manager.load_cutscene(interaction, object)
func _on_cutscene_loaded(cutscene_name: String, auto_start: bool):
func _on_cutscene_loaded(_cutscene_name: String, auto_start: bool):
if auto_start:
cutscene_manager.step()

View file

@ -0,0 +1,26 @@
extends Control
@onready var yonic_credits = $VBoxContainer/HBoxContainer/Yonic
@onready var reward_hint = $VBoxContainer/RewardHint
signal lerp_complete
var t = 0.0
var opacity_from = 0.0
var opacity_to = 0.0
func _ready():
yonic_credits.visible = !Globals.nsfw
modulate.a = opacity_from
func _process(delta):
if t < 1.0 and opacity_from != opacity_to:
t += delta
modulate.a = lerp(opacity_from, opacity_to, t)
if t >= 1.0:
lerp_complete.emit()
func reveal(reward_applicable: bool):
reward_hint.visible = Globals.nsfw and not reward_applicable
t = 0.0
opacity_to = 1.0

139
UI/prototype_credits.tscn Normal file
View file

@ -0,0 +1,139 @@
[gd_scene load_steps=11 format=3 uid="uid://6kq1081phjj8"]
[ext_resource type="Script" path="res://Scripts/UI/prototype_credits.gd" id="1_l27oe"]
[ext_resource type="FontFile" uid="uid://bgqotudi6bifk" path="res://UI/Gundam 00 font gaufont.ttf" id="1_mo4u7"]
[ext_resource type="Texture2D" uid="uid://c4iwqijfp013h" path="res://Hiro/Hiro_Idle_Blink_Sprites.png" id="1_v1v2f"]
[ext_resource type="Texture2D" uid="uid://bmix77hgm7q21" path="res://Reed/Reed_Idle_Blink_Sprites.png" id="2_n217s"]
[sub_resource type="LabelSettings" id="LabelSettings_3a8w4"]
font = ExtResource("1_mo4u7")
font_size = 32
outline_size = 8
outline_color = Color(0, 0, 0, 1)
[sub_resource type="AtlasTexture" id="AtlasTexture_jbqse"]
atlas = ExtResource("1_v1v2f")
region = Rect2(0, 0, 32, 32)
[sub_resource type="LabelSettings" id="LabelSettings_eg5ns"]
font = ExtResource("1_mo4u7")
font_color = Color(0.682353, 0.866667, 0.996078, 1)
outline_size = 4
outline_color = Color(0, 0, 0, 1)
[sub_resource type="LabelSettings" id="LabelSettings_xf38o"]
font = ExtResource("1_mo4u7")
font_size = 20
outline_size = 4
outline_color = Color(0, 0, 0, 1)
[sub_resource type="AtlasTexture" id="AtlasTexture_yln03"]
atlas = ExtResource("2_n217s")
region = Rect2(0, 0, 32, 32)
[sub_resource type="LabelSettings" id="LabelSettings_5v6rm"]
font = ExtResource("1_mo4u7")
font_color = Color(1, 1, 0, 1)
outline_color = Color(0, 0, 0, 1)
[node name="Credits" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
script = ExtResource("1_l27oe")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
alignment = 1
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer"]
layout_mode = 2
theme_override_constants/margin_bottom = 64
[node name="Label" type="Label" parent="VBoxContainer/MarginContainer"]
layout_mode = 2
text = "STAFF CREDITS"
label_settings = SubResource("LabelSettings_3a8w4")
horizontal_alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
layout_mode = 2
alignment = 1
[node name="Raxki" type="VBoxContainer" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 6
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/HBoxContainer/Raxki"]
layout_mode = 2
theme_override_constants/margin_bottom = 8
[node name="Sprite" type="TextureRect" parent="VBoxContainer/HBoxContainer/Raxki/MarginContainer"]
texture_filter = 1
custom_minimum_size = Vector2(64, 64)
layout_mode = 2
texture = SubResource("AtlasTexture_jbqse")
expand_mode = 2
stretch_mode = 5
[node name="Title" type="Label" parent="VBoxContainer/HBoxContainer/Raxki"]
layout_mode = 2
text = "CONCEPT & ART"
label_settings = SubResource("LabelSettings_eg5ns")
horizontal_alignment = 1
[node name="Name" type="Label" parent="VBoxContainer/HBoxContainer/Raxki"]
layout_mode = 2
text = "Raxki Yamato"
label_settings = SubResource("LabelSettings_xf38o")
horizontal_alignment = 1
[node name="Yonic" type="VBoxContainer" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 6
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/HBoxContainer/Yonic"]
layout_mode = 2
theme_override_constants/margin_bottom = 8
[node name="Sprite" type="TextureRect" parent="VBoxContainer/HBoxContainer/Yonic/MarginContainer"]
texture_filter = 1
custom_minimum_size = Vector2(64, 64)
layout_mode = 2
texture = SubResource("AtlasTexture_yln03")
expand_mode = 2
stretch_mode = 5
[node name="Title" type="Label" parent="VBoxContainer/HBoxContainer/Yonic"]
layout_mode = 2
text = "DESIGN & PROGRAMMING"
label_settings = SubResource("LabelSettings_eg5ns")
horizontal_alignment = 1
[node name="Name" type="Label" parent="VBoxContainer/HBoxContainer/Yonic"]
layout_mode = 2
text = "Yonic Soseki"
label_settings = SubResource("LabelSettings_xf38o")
horizontal_alignment = 1
[node name="RewardHint" type="MarginContainer" parent="VBoxContainer"]
layout_mode = 2
theme_override_constants/margin_left = 8
theme_override_constants/margin_top = 8
theme_override_constants/margin_right = 8
[node name="Label" type="Label" parent="VBoxContainer/RewardHint"]
layout_mode = 2
text = "If you perform perfectly in the exhibition match,
you can get a special reward!"
label_settings = SubResource("LabelSettings_5v6rm")
horizontal_alignment = 1

BIN
world/prototype_reward.png (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://e7g3ylmbymwi"
path="res://.godot/imported/prototype_reward.png-5ddd5cedaa9b26fa8cca172e4e4dddaa.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://world/prototype_reward.png"
dest_files=["res://.godot/imported/prototype_reward.png-5ddd5cedaa9b26fa8cca172e4e4dddaa.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=39 format=3 uid="uid://bxuxjqxxqy7ce"]
[gd_scene load_steps=41 format=3 uid="uid://bxuxjqxxqy7ce"]
[ext_resource type="PackedScene" uid="uid://di21xheryhp0k" path="res://Hiro/hiro_player.tscn" id="1_c1gpq"]
[ext_resource type="PackedScene" uid="uid://b8sfype1vx5ad" path="res://Nem/nem_npc.tscn" id="1_sqt7d"]
@ -6,12 +6,14 @@
[ext_resource type="FontFile" uid="uid://bgqotudi6bifk" path="res://UI/Gundam 00 font gaufont.ttf" id="2_64thh"]
[ext_resource type="Script" path="res://Scripts/UI/pause_menu.gd" id="2_nw73f"]
[ext_resource type="PackedScene" uid="uid://bcwkugn6v3oy7" path="res://addons/godot_state_charts/utilities/state_chart_debugger.tscn" id="2_o5str"]
[ext_resource type="Resource" uid="uid://bj3rm1r1ouq0r" path="res://Cutscenes/prototype_start.tres" id="3_teat4"]
[ext_resource type="Resource" uid="uid://bj3rm1r1ouq0r" path="res://Cutscenes/prototype_start.tres" id="3_wp6v0"]
[ext_resource type="Texture2D" uid="uid://b40la2vyf4rn6" path="res://world/Fighting Dojo BG.png" id="4_elb6q"]
[ext_resource type="Texture2D" uid="uid://dc12iaho4b8yl" path="res://world/walls.png" id="7_pp5dn"]
[ext_resource type="PackedScene" uid="uid://c503u0i421w34" path="res://world/pillar.tscn" id="8_mxq55"]
[ext_resource type="Script" path="res://Scripts/explosion_generator.gd" id="9_df2wo"]
[ext_resource type="PackedScene" uid="uid://ce2tjyxwaar01" path="res://UI/battle_ui.tscn" id="10_hxn8m"]
[ext_resource type="Texture2D" uid="uid://e7g3ylmbymwi" path="res://world/prototype_reward.png" id="10_qggmb"]
[ext_resource type="PackedScene" uid="uid://6kq1081phjj8" path="res://UI/prototype_credits.tscn" id="11_2tmmx"]
[ext_resource type="Texture2D" uid="uid://b7l1k8j3ie4qi" path="res://NPCs/npc1.png" id="11_p77ah"]
[ext_resource type="PackedScene" uid="uid://7oi3hcf5q4o7" path="res://UI/textbox_ui.tscn" id="12_8pgvx"]
[ext_resource type="Resource" uid="uid://ck0ry5vxaj8a7" path="res://Cutscenes/prototype_talk_to_nem.tres" id="12_cb4j5"]
@ -125,7 +127,7 @@ script = ExtResource("1_y634h")
[node name="CutsceneManager" type="Node" parent="."]
script = ExtResource("19_5yvrq")
cutscene = ExtResource("3_teat4")
cutscene = ExtResource("3_wp6v0")
[node name="MusicManager" parent="." instance=ExtResource("24_03wyf")]
@ -170,7 +172,10 @@ label_settings = SubResource("LabelSettings_f2g0a")
layer = 3
cps = 100.0
[node name="Control" type="Control" parent="TextboxUI"]
[node name="Fades" type="CanvasLayer" parent="."]
layer = 2
[node name="Control" type="Control" parent="Fades"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
@ -178,7 +183,18 @@ anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="FaderRect" type="ColorRect" parent="TextboxUI/Control"]
[node name="NSFWReward" type="TextureRect" parent="Fades/Control"]
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("10_qggmb")
expand_mode = 3
[node name="FaderRect" type="ColorRect" parent="Fades/Control"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
@ -188,12 +204,14 @@ grow_vertical = 2
mouse_filter = 2
color = Color(0, 0, 0, 0)
[node name="AnimationPlayer" type="AnimationPlayer" parent="TextboxUI/Control/FaderRect"]
[node name="AnimationPlayer" type="AnimationPlayer" parent="Fades/Control/FaderRect"]
libraries = {
"": SubResource("AnimationLibrary_oss1s")
}
[node name="Fades" type="CanvasLayer" parent="."]
[node name="Credits" parent="Fades/Control" instance=ExtResource("11_2tmmx")]
visible = false
layout_mode = 1
[node name="CanvasLayer" type="CanvasLayer" parent="."]