diff --git a/Scripts/Levels/arena_level.gd b/Scripts/Levels/arena_level.gd index 7e6c775..60e9126 100644 --- a/Scripts/Levels/arena_level.gd +++ b/Scripts/Levels/arena_level.gd @@ -12,7 +12,8 @@ extends Node2D @onready var fader_animation = $Fades/Control/FaderRect/AnimationPlayer @onready var barrier = $Barrier @onready var credits = $Fades/Control/Credits -@onready var reward = $Fades/Control/NSFWReward +@onready var reward_nsfw = $Fades/Control/NSFWReward +@onready var reward_sfw = $Fades/Control/SFWReward @export var stage = 1 @@ -60,17 +61,14 @@ func _on_cutscene_finished(cutscene_name: String): 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("") + credits.visible = true + credits.reveal(player.health == player.max_health) player.in_cutscene = true - -func _show_credits(_anim_name: StringName): - credits.visible = true - credits.reveal(player.health == player.max_health) + +func _on_credits_requested_reward(): + reward_nsfw.visible = Globals.nsfw + reward_sfw.visible = not Globals.nsfw + fader_animation.play("fade_in_black") func _on_cutscene_manager_issued_command(command: CutsceneCommand, manager: CutsceneManager): if command is TurnCharacterCommand or command is LookAtTargetCommand: diff --git a/Scripts/UI/prototype_credits.gd b/Scripts/UI/prototype_credits.gd index 1ea075c..d824f89 100644 --- a/Scripts/UI/prototype_credits.gd +++ b/Scripts/UI/prototype_credits.gd @@ -2,13 +2,17 @@ extends Control @onready var yonic_credits = $VBoxContainer/HBoxContainer/Yonic @onready var reward_hint = $VBoxContainer/RewardHint +@onready var reward_hint_label = $VBoxContainer/RewardHint/Label -signal lerp_complete +signal reward_requested +signal given_way var t = 0.0 var opacity_from = 0.0 var opacity_to = 0.0 +var reward_unlocked = false + func _ready(): yonic_credits.visible = !Globals.nsfw modulate.a = opacity_from @@ -17,10 +21,23 @@ 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() + if t >= 1.0 and opacity_to == 0.0 and reward_unlocked: + reward_requested.emit() func reveal(reward_applicable: bool): - reward_hint.visible = Globals.nsfw and not reward_applicable + reward_unlocked = reward_applicable + if reward_unlocked: + reward_hint_label.text = "You performed commendably!\nSpecial reward unlocked! Press X to check it." t = 0.0 opacity_to = 1.0 + +func give_way(): + opacity_from = 1.0 + opacity_to = 0.0 + t = 0.0 + +func _input(event: InputEvent): + if event.is_action_pressed("ui_accept") and t >= 1.0: + give_way() + given_way.emit() + get_viewport().set_input_as_handled() diff --git a/UI/prototype_credits.tscn b/UI/prototype_credits.tscn index d473706..3b44bd7 100644 --- a/UI/prototype_credits.tscn +++ b/UI/prototype_credits.tscn @@ -87,7 +87,7 @@ stretch_mode = 5 [node name="Title" type="Label" parent="VBoxContainer/HBoxContainer/Raxki"] layout_mode = 2 -text = "CONCEPT & ART" +text = "DIRECTOR & ART" label_settings = SubResource("LabelSettings_eg5ns") horizontal_alignment = 1 @@ -125,6 +125,108 @@ text = "Yonic Soseki" label_settings = SubResource("LabelSettings_xf38o") horizontal_alignment = 1 +[node name="Credits3" type="VBoxContainer" parent="VBoxContainer/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 6 + +[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/HBoxContainer/Credits3"] +layout_mode = 2 +theme_override_constants/margin_bottom = 16 + +[node name="Title" type="Label" parent="VBoxContainer/HBoxContainer/Credits3"] +layout_mode = 2 +text = "YCH CROWD" +label_settings = SubResource("LabelSettings_eg5ns") +horizontal_alignment = 1 + +[node name="Name" type="Label" parent="VBoxContainer/HBoxContainer/Credits3"] +layout_mode = 2 +text = "CodyKogitsune +supersonicfa +ZakiV +BrianF" +label_settings = SubResource("LabelSettings_xf38o") +horizontal_alignment = 1 + +[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer"] +layout_mode = 2 +alignment = 1 + +[node name="Credits1" type="VBoxContainer" parent="VBoxContainer/HBoxContainer2"] +layout_mode = 2 +size_flags_horizontal = 6 + +[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/HBoxContainer2/Credits1"] +layout_mode = 2 +theme_override_constants/margin_bottom = 16 + +[node name="Title" type="Label" parent="VBoxContainer/HBoxContainer2/Credits1"] +layout_mode = 2 +text = "ORIGINAL ART" +label_settings = SubResource("LabelSettings_eg5ns") +horizontal_alignment = 1 + +[node name="Name" type="Label" parent="VBoxContainer/HBoxContainer2/Credits1"] +layout_mode = 2 +text = "Andrew Meyers" +label_settings = SubResource("LabelSettings_xf38o") +horizontal_alignment = 1 + +[node name="Credits2" type="VBoxContainer" parent="VBoxContainer/HBoxContainer2"] +layout_mode = 2 +size_flags_horizontal = 6 + +[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/HBoxContainer2/Credits2"] +layout_mode = 2 +theme_override_constants/margin_bottom = 16 + +[node name="Title" type="Label" parent="VBoxContainer/HBoxContainer2/Credits2"] +layout_mode = 2 +text = "ORIGINAL AUDIO" +label_settings = SubResource("LabelSettings_eg5ns") +horizontal_alignment = 1 + +[node name="Name" type="Label" parent="VBoxContainer/HBoxContainer2/Credits2"] +layout_mode = 2 +text = "Paul Carmody +Yoko Shimomura +Yoshifumi Ushima" +label_settings = SubResource("LabelSettings_xf38o") +horizontal_alignment = 1 + +[node name="Credits3" type="VBoxContainer" parent="VBoxContainer/HBoxContainer2"] +layout_mode = 2 +size_flags_horizontal = 6 + +[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/HBoxContainer2/Credits3"] +layout_mode = 2 +theme_override_constants/margin_bottom = 16 + +[node name="Title" type="Label" parent="VBoxContainer/HBoxContainer2/Credits3"] +layout_mode = 2 +text = "SPECIAL THANKS" +label_settings = SubResource("LabelSettings_eg5ns") +horizontal_alignment = 1 + +[node name="Name" type="Label" parent="VBoxContainer/HBoxContainer2/Credits3"] +layout_mode = 2 +text = "Rikka +& my friends +and supporters" +label_settings = SubResource("LabelSettings_xf38o") +horizontal_alignment = 1 + +[node name="MarginContainer2" type="MarginContainer" parent="VBoxContainer"] +layout_mode = 2 +theme_override_constants/margin_top = 8 +theme_override_constants/margin_bottom = 8 + +[node name="Label" type="Label" parent="VBoxContainer/MarginContainer2"] +layout_mode = 2 +text = "In memory of my late friends" +label_settings = SubResource("LabelSettings_xf38o") +horizontal_alignment = 1 + [node name="RewardHint" type="MarginContainer" parent="VBoxContainer"] layout_mode = 2 theme_override_constants/margin_left = 8 diff --git a/world/prototype_reward_sfw.png b/world/prototype_reward_sfw.png new file mode 100644 index 0000000..0867563 --- /dev/null +++ b/world/prototype_reward_sfw.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:327e68e1763a7c33146b4370b57cc0746d09692b3c328348eb4686ebb9340f72 +size 1220256 diff --git a/world/prototype_reward_sfw.png.import b/world/prototype_reward_sfw.png.import new file mode 100644 index 0000000..529451f --- /dev/null +++ b/world/prototype_reward_sfw.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dbiqq00uaaev" +path="res://.godot/imported/prototype_reward_sfw.png-a93d302c7f2390ae036596ac55f40fe2.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://world/prototype_reward_sfw.png" +dest_files=["res://.godot/imported/prototype_reward_sfw.png-a93d302c7f2390ae036596ac55f40fe2.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 diff --git a/world/world.tscn b/world/world.tscn index ee7f5e0..17cbb6b 100644 --- a/world/world.tscn +++ b/world/world.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=41 format=3 uid="uid://bxuxjqxxqy7ce"] +[gd_scene load_steps=42 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,7 +6,7 @@ [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_wp6v0"] +[ext_resource type="Resource" uid="uid://bj3rm1r1ouq0r" path="res://Cutscenes/prototype_start.tres" id="3_i6m8h"] [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"] @@ -14,6 +14,7 @@ [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://dbiqq00uaaev" path="res://world/prototype_reward_sfw.png" id="11_ni26m"] [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"] @@ -127,7 +128,7 @@ script = ExtResource("1_y634h") [node name="CutsceneManager" type="Node" parent="."] script = ExtResource("19_5yvrq") -cutscene = ExtResource("3_wp6v0") +cutscene = ExtResource("3_i6m8h") [node name="MusicManager" parent="." instance=ExtResource("24_03wyf")] @@ -182,6 +183,7 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +mouse_filter = 2 [node name="NSFWReward" type="TextureRect" parent="Fades/Control"] visible = false @@ -194,6 +196,17 @@ grow_vertical = 2 texture = ExtResource("10_qggmb") expand_mode = 3 +[node name="SFWReward" 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("11_ni26m") +expand_mode = 3 + [node name="FaderRect" type="ColorRect" parent="Fades/Control"] layout_mode = 1 anchors_preset = 15 @@ -429,6 +442,8 @@ polygon = PackedVector2Array(-84, -31, -76, -57, -43, -71, -84, -71) [connection signal="dialogue_completed" from="TextboxUI" to="CutsceneManager" method="_on_ui_dialogue_completed"] [connection signal="dialogue_continued" from="TextboxUI" to="SoundManager" method="_on_ui_dialogue_continued"] [connection signal="dialogue_opened" from="TextboxUI" to="SoundManager" method="_on_ui_dialogue_opened"] +[connection signal="given_way" from="Fades/Control/Credits" to="SoundManager" method="_on_game_pause_toggled" binds= [false]] +[connection signal="reward_requested" from="Fades/Control/Credits" to="." method="_on_credits_requested_reward"] [connection signal="attack_did_hit" from="HiroPlayer" to="ShadowClone" method="_on_player_attack_did_hit"] [connection signal="attack_did_hit" from="HiroPlayer" to="ReedAI" method="_on_player_attack_did_hit"] [connection signal="attacked" from="HiroPlayer" to="SoundManager" method="_on_humanoid_character_attacked"]