diff --git a/assets/music/squashin_bugs_fixed.mp3 b/assets/music/squashin_bugs_fixed.mp3 new file mode 100644 index 00000000..0ff3e9d1 Binary files /dev/null and b/assets/music/squashin_bugs_fixed.mp3 differ diff --git a/assets/music/squashin_bugs_fixed.mp3.import b/assets/music/squashin_bugs_fixed.mp3.import new file mode 100644 index 00000000..fcde7c6a --- /dev/null +++ b/assets/music/squashin_bugs_fixed.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://dagiejnj8dwqb" +path="res://.godot/imported/squashin_bugs_fixed.mp3-2b24ce049fb783ff4ed6ca443f2919af.mp3str" + +[deps] + +source_file="res://assets/music/squashin_bugs_fixed.mp3" +dest_files=["res://.godot/imported/squashin_bugs_fixed.mp3-2b24ce049fb783ff4ed6ca443f2919af.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/assets/music/the_fun_run.mp3 b/assets/music/the_fun_run.mp3 new file mode 100644 index 00000000..2c77cb36 Binary files /dev/null and b/assets/music/the_fun_run.mp3 differ diff --git a/assets/music/the_fun_run.mp3.import b/assets/music/the_fun_run.mp3.import new file mode 100644 index 00000000..6f19f395 --- /dev/null +++ b/assets/music/the_fun_run.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://dj7yf3u7fdxdu" +path="res://.godot/imported/the_fun_run.mp3-13f445e1c9bc6ca7d2d6d3cab74e9ee6.mp3str" + +[deps] + +source_file="res://assets/music/the_fun_run.mp3" +dest_files=["res://.godot/imported/the_fun_run.mp3-13f445e1c9bc6ca7d2d6d3cab74e9ee6.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/maps/test_combat_arena.tscn b/maps/test_combat_arena.tscn index 28f0d2ba..eb1777b7 100644 --- a/maps/test_combat_arena.tscn +++ b/maps/test_combat_arena.tscn @@ -1,10 +1,12 @@ -[gd_scene load_steps=4 format=3 uid="uid://wivtmf75ic3f"] +[gd_scene load_steps=5 format=3 uid="uid://wivtmf75ic3f"] [ext_resource type="PackedScene" uid="uid://b3ciqydkjnkkx" path="res://src/combat/combat_arena.tscn" id="1_etpkf"] [ext_resource type="Texture2D" uid="uid://w55nt3s833tb" path="res://assets/arenas/steppes.png" id="2_i30nm"] +[ext_resource type="AudioStream" uid="uid://dagiejnj8dwqb" path="res://assets/music/squashin_bugs_fixed.mp3" id="2_vo8mp"] [ext_resource type="Texture2D" uid="uid://e4b6flk7roy3" path="res://assets/battlers/bugcat.png" id="3_rfyrg"] [node name="TestCombatArena" instance=ExtResource("1_etpkf")] +music = ExtResource("2_vo8mp") [node name="Background" parent="." index="0"] texture = ExtResource("2_i30nm") diff --git a/maps/test_combat_arena2.tscn b/maps/test_combat_arena2.tscn index bb68d6c4..08ab2271 100644 --- a/maps/test_combat_arena2.tscn +++ b/maps/test_combat_arena2.tscn @@ -1,11 +1,13 @@ -[gd_scene load_steps=5 format=3 uid="uid://bq6b26pctmol4"] +[gd_scene load_steps=6 format=3 uid="uid://bq6b26pctmol4"] [ext_resource type="PackedScene" uid="uid://b3ciqydkjnkkx" path="res://src/combat/combat_arena.tscn" id="1_tqh6v"] [ext_resource type="Texture2D" uid="uid://w55nt3s833tb" path="res://assets/arenas/steppes.png" id="2_5pnp5"] +[ext_resource type="AudioStream" uid="uid://dj7yf3u7fdxdu" path="res://assets/music/the_fun_run.mp3" id="2_gvpi1"] [ext_resource type="Texture2D" uid="uid://dr8cs6liv45hd" path="res://assets/battlers/wolf.png" id="3_d5gu6"] [ext_resource type="Texture2D" uid="uid://cbgfjvlm8kx4k" path="res://assets/battlers/squirrel.png" id="4_kpf44"] [node name="TestCombatArena" instance=ExtResource("1_tqh6v")] +music = ExtResource("2_gvpi1") [node name="Background" parent="." index="0"] texture = ExtResource("2_5pnp5") diff --git a/src/field/cutscenes/templates/doors/door.gd b/src/field/cutscenes/templates/doors/door.gd index 36285d27..b5c1b637 100644 --- a/src/field/cutscenes/templates/doors/door.gd +++ b/src/field/cutscenes/templates/doors/door.gd @@ -11,6 +11,9 @@ class_name Door extends AreaTransition await ready _blocking_area.get_node("CollisionShape2D").disabled = !is_locked + + # Wait one frame for the physics server to update before rebuilding the pathfinders. + await get_tree().physics_frame FieldEvents.terrain_changed.emit() @onready var _anim: = $AnimationPlayer as AnimationPlayer diff --git a/src/field/cutscenes/templates/doors/door.tscn b/src/field/cutscenes/templates/doors/door.tscn index a212e7ae..d062044b 100644 --- a/src/field/cutscenes/templates/doors/door.tscn +++ b/src/field/cutscenes/templates/doors/door.tscn @@ -190,19 +190,16 @@ monitoring = false [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D/ClosedDoor/BlockingArea" index="0"] shape = SubResource("RectangleShape2D_xgpwx") -[node name="Destination" parent="." index="1"] -position = Vector2(0, 0) - -[node name="AnimationPlayer" type="AnimationPlayer" parent="." index="4"] +[node name="AnimationPlayer" type="AnimationPlayer" parent="." index="3"] libraries = { "": SubResource("AnimationLibrary_k2tlp") } autoplay = "RESET" -[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="." index="5"] +[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="." index="4"] bus = &"SFX" -[node name="LockedLabel" type="Label" parent="." index="6"] +[node name="LockedLabel" type="Label" parent="." index="5"] visible = false z_index = 101 offset_left = -17.0 diff --git a/src/main.tscn b/src/main.tscn index 6b30c61c..5a50e67e 100644 --- a/src/main.tscn +++ b/src/main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=91 format=3 uid="uid://p01fb6nvi144"] +[gd_scene load_steps=90 format=3 uid="uid://p01fb6nvi144"] [ext_resource type="Script" path="res://src/field/field.gd" id="2_bkxev"] [ext_resource type="Script" path="res://src/field/field_cursor.gd" id="5_3guor"] @@ -68,7 +68,6 @@ [ext_resource type="AudioStream" uid="uid://b6c1p14bc20p1" path="res://addons/dialogic/Example Assets/sound-effects/typing1.wav" id="54_fh5dy"] [ext_resource type="AudioStream" uid="uid://c3uw4nft0de13" path="res://addons/dialogic/Example Assets/sound-effects/typing2.wav" id="55_8lvao"] [ext_resource type="Script" path="res://maps/opening_cutscene.gd" id="55_vsmkr"] -[ext_resource type="Script" path="res://src/common/screen_transitions/screen_transition.gd" id="56_cx0l3"] [ext_resource type="AudioStream" uid="uid://dnboblpkf0fqi" path="res://addons/dialogic/Example Assets/sound-effects/typing3.wav" id="56_prbwr"] [ext_resource type="AudioStream" uid="uid://c2viukvbub6v6" path="res://addons/dialogic/Example Assets/sound-effects/typing4.wav" id="57_tomnb"] [ext_resource type="AudioStream" uid="uid://dwcre3fjf3cj8" path="res://addons/dialogic/Example Assets/sound-effects/typing5.wav" id="58_br2ni"] @@ -181,7 +180,7 @@ tracks/0/keys = { tracks/1/type = "value" tracks/1/imported = false tracks/1/enabled = true -tracks/1/path = NodePath("AnimationPlayer/ScreenTransition/ColorRect/VBoxContainer/VBoxContainer:modulate") +tracks/1/path = NodePath("AnimationPlayer/WinScreen/ColorRect/VBoxContainer/VBoxContainer:modulate") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/keys = { @@ -190,6 +189,30 @@ tracks/1/keys = { "update": 0, "values": [Color(1, 1, 1, 0)] } +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("AnimationPlayer/WinScreen/ColorRect:visible") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [false] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("AnimationPlayer/WinScreen/ColorRect:modulate") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Color(1, 1, 1, 0)] +} [sub_resource type="Animation" id="Animation_6j1bu"] resource_name = "lunge" @@ -237,7 +260,7 @@ tracks/1/use_blend = true tracks/2/type = "method" tracks/2/imported = false tracks/2/enabled = true -tracks/2/path = NodePath("AnimationPlayer/ScreenTransition") +tracks/2/path = NodePath("AnimationPlayer/WinScreen") tracks/2/interp = 1 tracks/2/loop_wrap = true tracks/2/keys = { @@ -251,7 +274,7 @@ tracks/2/keys = { tracks/3/type = "value" tracks/3/imported = false tracks/3/enabled = true -tracks/3/path = NodePath("AnimationPlayer/ScreenTransition/ColorRect/VBoxContainer/VBoxContainer:modulate") +tracks/3/path = NodePath("AnimationPlayer/WinScreen/ColorRect/VBoxContainer/VBoxContainer:modulate") tracks/3/interp = 1 tracks/3/loop_wrap = true tracks/3/keys = { @@ -260,6 +283,30 @@ tracks/3/keys = { "update": 0, "values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)] } +tracks/4/type = "value" +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/path = NodePath("AnimationPlayer/WinScreen/ColorRect:visible") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/keys = { +"times": PackedFloat32Array(1.1), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [true] +} +tracks/5/type = "value" +tracks/5/imported = false +tracks/5/enabled = true +tracks/5/path = NodePath("AnimationPlayer/WinScreen/ColorRect:modulate") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/keys = { +"times": PackedFloat32Array(1.1, 1.4), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)] +} [sub_resource type="AnimationLibrary" id="AnimationLibrary_d6ycm"] _data = { @@ -608,11 +655,11 @@ libraries = { "": SubResource("AnimationLibrary_d6ycm") } -[node name="ScreenTransition" type="CanvasLayer" parent="Field/Terrain/Gamepieces/Grove/Ghost/AnimationPlayer"] -script = ExtResource("56_cx0l3") +[node name="WinScreen" type="CanvasLayer" parent="Field/Terrain/Gamepieces/Grove/Ghost/AnimationPlayer"] -[node name="ColorRect" type="ColorRect" parent="Field/Terrain/Gamepieces/Grove/Ghost/AnimationPlayer/ScreenTransition"] +[node name="ColorRect" type="ColorRect" parent="Field/Terrain/Gamepieces/Grove/Ghost/AnimationPlayer/WinScreen"] visible = false +modulate = Color(1, 1, 1, 0) anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 @@ -621,7 +668,7 @@ grow_vertical = 2 mouse_filter = 2 color = Color(0, 0, 0, 1) -[node name="VBoxContainer" type="CenterContainer" parent="Field/Terrain/Gamepieces/Grove/Ghost/AnimationPlayer/ScreenTransition/ColorRect"] +[node name="VBoxContainer" type="CenterContainer" parent="Field/Terrain/Gamepieces/Grove/Ghost/AnimationPlayer/WinScreen/ColorRect"] layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 @@ -629,16 +676,16 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -[node name="VBoxContainer" type="VBoxContainer" parent="Field/Terrain/Gamepieces/Grove/Ghost/AnimationPlayer/ScreenTransition/ColorRect/VBoxContainer"] +[node name="VBoxContainer" type="VBoxContainer" parent="Field/Terrain/Gamepieces/Grove/Ghost/AnimationPlayer/WinScreen/ColorRect/VBoxContainer"] modulate = Color(1, 1, 1, 0) layout_mode = 2 -[node name="Label" type="Label" parent="Field/Terrain/Gamepieces/Grove/Ghost/AnimationPlayer/ScreenTransition/ColorRect/VBoxContainer/VBoxContainer"] +[node name="Label" type="Label" parent="Field/Terrain/Gamepieces/Grove/Ghost/AnimationPlayer/WinScreen/ColorRect/VBoxContainer/VBoxContainer"] layout_mode = 2 text = "THANK YOU FOR PLAYING!" label_settings = SubResource("LabelSettings_dkg5i") -[node name="Label2" type="Label" parent="Field/Terrain/Gamepieces/Grove/Ghost/AnimationPlayer/ScreenTransition/ColorRect/VBoxContainer/VBoxContainer"] +[node name="Label2" type="Label" parent="Field/Terrain/Gamepieces/Grove/Ghost/AnimationPlayer/WinScreen/ColorRect/VBoxContainer/VBoxContainer"] custom_minimum_size = Vector2(800, 0) layout_mode = 2 text = "Find more info or ways to help out at