diff --git a/Assets/Sound/General/cannonexpl.mp3 b/Assets/Sound/General/cannonexpl.mp3 new file mode 100644 index 0000000..71e7e2f Binary files /dev/null and b/Assets/Sound/General/cannonexpl.mp3 differ diff --git a/Assets/Sound/General/cannonexpl.mp3.import b/Assets/Sound/General/cannonexpl.mp3.import new file mode 100644 index 0000000..f1995c7 --- /dev/null +++ b/Assets/Sound/General/cannonexpl.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://dbse0kwmlxnmb" +path="res://.godot/imported/cannonexpl.mp3-0b0f19cbd3d702a2d77026228d337f59.mp3str" + +[deps] + +source_file="res://Assets/Sound/General/cannonexpl.mp3" +dest_files=["res://.godot/imported/cannonexpl.mp3-0b0f19cbd3d702a2d77026228d337f59.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Assets/Sound/General/pain1.mp3 b/Assets/Sound/General/pain1.mp3 new file mode 100644 index 0000000..15fa204 Binary files /dev/null and b/Assets/Sound/General/pain1.mp3 differ diff --git a/Assets/Sound/General/pain1.mp3.import b/Assets/Sound/General/pain1.mp3.import new file mode 100644 index 0000000..acf2f8c --- /dev/null +++ b/Assets/Sound/General/pain1.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://bgg6sgybygvkl" +path="res://.godot/imported/pain1.mp3-c5902150c3d7f44eaca760f4400df4a2.mp3str" + +[deps] + +source_file="res://Assets/Sound/General/pain1.mp3" +dest_files=["res://.godot/imported/pain1.mp3-c5902150c3d7f44eaca760f4400df4a2.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Assets/Sound/General/pain2.mp3 b/Assets/Sound/General/pain2.mp3 new file mode 100644 index 0000000..3bc64bf Binary files /dev/null and b/Assets/Sound/General/pain2.mp3 differ diff --git a/Assets/Sound/General/pain2.mp3.import b/Assets/Sound/General/pain2.mp3.import new file mode 100644 index 0000000..5e9d992 --- /dev/null +++ b/Assets/Sound/General/pain2.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://d0ku4872ejcsm" +path="res://.godot/imported/pain2.mp3-23be41f4005b7c486bfba8a72b42663b.mp3str" + +[deps] + +source_file="res://Assets/Sound/General/pain2.mp3" +dest_files=["res://.godot/imported/pain2.mp3-23be41f4005b7c486bfba8a72b42663b.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Assets/Sound/General/pain3.mp3 b/Assets/Sound/General/pain3.mp3 new file mode 100644 index 0000000..3109879 Binary files /dev/null and b/Assets/Sound/General/pain3.mp3 differ diff --git a/Assets/Sound/General/pain3.mp3.import b/Assets/Sound/General/pain3.mp3.import new file mode 100644 index 0000000..1d2217e --- /dev/null +++ b/Assets/Sound/General/pain3.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://wtu02fjmmxjg" +path="res://.godot/imported/pain3.mp3-22b2ec09a218c675e3caa60840e39c7b.mp3str" + +[deps] + +source_file="res://Assets/Sound/General/pain3.mp3" +dest_files=["res://.godot/imported/pain3.mp3-22b2ec09a218c675e3caa60840e39c7b.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Assets/Sound/General/pain3.wav b/Assets/Sound/General/pain3.wav new file mode 100644 index 0000000..dc7c147 Binary files /dev/null and b/Assets/Sound/General/pain3.wav differ diff --git a/Assets/Sound/General/pain3.wav.import b/Assets/Sound/General/pain3.wav.import new file mode 100644 index 0000000..f022b5c --- /dev/null +++ b/Assets/Sound/General/pain3.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://fnmrlii083fq" +path="res://.godot/imported/pain3.wav-d4f1c283e27d08222cf673a3ed967148.sample" + +[deps] + +source_file="res://Assets/Sound/General/pain3.wav" +dest_files=["res://.godot/imported/pain3.wav-d4f1c283e27d08222cf673a3ed967148.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/Assets/Sound/General/waves.wav b/Assets/Sound/General/waves.wav new file mode 100644 index 0000000..6f8b5b4 Binary files /dev/null and b/Assets/Sound/General/waves.wav differ diff --git a/Assets/Sound/General/waves.wav.import b/Assets/Sound/General/waves.wav.import new file mode 100644 index 0000000..0b4138e --- /dev/null +++ b/Assets/Sound/General/waves.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://ckgskn48gbs1e" +path="res://.godot/imported/waves.wav-2aa278b5b988b2f0eea37562ec9b2272.sample" + +[deps] + +source_file="res://Assets/Sound/General/waves.wav" +dest_files=["res://.godot/imported/waves.wav-2aa278b5b988b2f0eea37562ec9b2272.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=2 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/Assets/Sound/Music/bucaneers.mp3 b/Assets/Sound/Music/bucaneers.mp3 new file mode 100644 index 0000000..89a4fab Binary files /dev/null and b/Assets/Sound/Music/bucaneers.mp3 differ diff --git a/Assets/Sound/Music/bucaneers.mp3.import b/Assets/Sound/Music/bucaneers.mp3.import new file mode 100644 index 0000000..c9f9dc7 --- /dev/null +++ b/Assets/Sound/Music/bucaneers.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://xpubnr7otkvu" +path="res://.godot/imported/bucaneers.mp3-af206ff60573b5bf93d9f3e194801379.mp3str" + +[deps] + +source_file="res://Assets/Sound/Music/bucaneers.mp3" +dest_files=["res://.godot/imported/bucaneers.mp3-af206ff60573b5bf93d9f3e194801379.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Assets/Sound/NPC/cannonshot1.wav b/Assets/Sound/NPC/cannonshot1.wav new file mode 100644 index 0000000..58aa755 Binary files /dev/null and b/Assets/Sound/NPC/cannonshot1.wav differ diff --git a/Assets/Sound/NPC/cannonshot1.wav.import b/Assets/Sound/NPC/cannonshot1.wav.import new file mode 100644 index 0000000..f19e122 --- /dev/null +++ b/Assets/Sound/NPC/cannonshot1.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://cnmbr5npk04cf" +path="res://.godot/imported/cannonshot1.wav-0c65bd47fc64b2b6da5d658a5615ab5b.sample" + +[deps] + +source_file="res://Assets/Sound/NPC/cannonshot1.wav" +dest_files=["res://.godot/imported/cannonshot1.wav-0c65bd47fc64b2b6da5d658a5615ab5b.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/Assets/Sound/NPC/cannonshot2.wav b/Assets/Sound/NPC/cannonshot2.wav new file mode 100644 index 0000000..4a0bf20 Binary files /dev/null and b/Assets/Sound/NPC/cannonshot2.wav differ diff --git a/Assets/Sound/NPC/cannonshot2.wav.import b/Assets/Sound/NPC/cannonshot2.wav.import new file mode 100644 index 0000000..d378834 --- /dev/null +++ b/Assets/Sound/NPC/cannonshot2.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://dm37s0itc058d" +path="res://.godot/imported/cannonshot2.wav-1c1e5a8a3aa2a7a051e463336a5e2b86.sample" + +[deps] + +source_file="res://Assets/Sound/NPC/cannonshot2.wav" +dest_files=["res://.godot/imported/cannonshot2.wav-1c1e5a8a3aa2a7a051e463336a5e2b86.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/Assets/Sound/NPC/swoosh 1.mp3 b/Assets/Sound/NPC/swoosh 1.mp3 new file mode 100644 index 0000000..c24aecb Binary files /dev/null and b/Assets/Sound/NPC/swoosh 1.mp3 differ diff --git a/Assets/Sound/NPC/swoosh 1.mp3.import b/Assets/Sound/NPC/swoosh 1.mp3.import new file mode 100644 index 0000000..212366e --- /dev/null +++ b/Assets/Sound/NPC/swoosh 1.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://dklipefwq41dr" +path="res://.godot/imported/swoosh 1.mp3-0ab958f722566489ebed0f90245d1117.mp3str" + +[deps] + +source_file="res://Assets/Sound/NPC/swoosh 1.mp3" +dest_files=["res://.godot/imported/swoosh 1.mp3-0ab958f722566489ebed0f90245d1117.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Assets/Sound/NPC/swoosh 2.mp3 b/Assets/Sound/NPC/swoosh 2.mp3 new file mode 100644 index 0000000..9a5f1ce Binary files /dev/null and b/Assets/Sound/NPC/swoosh 2.mp3 differ diff --git a/Assets/Sound/NPC/swoosh 2.mp3.import b/Assets/Sound/NPC/swoosh 2.mp3.import new file mode 100644 index 0000000..af81238 --- /dev/null +++ b/Assets/Sound/NPC/swoosh 2.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://sqwwcw6kfgqa" +path="res://.godot/imported/swoosh 2.mp3-d1ef3af8521e61bd3939372c320de59a.mp3str" + +[deps] + +source_file="res://Assets/Sound/NPC/swoosh 2.mp3" +dest_files=["res://.godot/imported/swoosh 2.mp3-d1ef3af8521e61bd3939372c320de59a.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Assets/Sound/NPC/swoosh 3.mp3 b/Assets/Sound/NPC/swoosh 3.mp3 new file mode 100644 index 0000000..ba4ec5a Binary files /dev/null and b/Assets/Sound/NPC/swoosh 3.mp3 differ diff --git a/Assets/Sound/NPC/swoosh 3.mp3.import b/Assets/Sound/NPC/swoosh 3.mp3.import new file mode 100644 index 0000000..a93e69e --- /dev/null +++ b/Assets/Sound/NPC/swoosh 3.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://ccj7b845sm1rq" +path="res://.godot/imported/swoosh 3.mp3-01acdca0b25893534ce84b1e9726abeb.mp3str" + +[deps] + +source_file="res://Assets/Sound/NPC/swoosh 3.mp3" +dest_files=["res://.godot/imported/swoosh 3.mp3-01acdca0b25893534ce84b1e9726abeb.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Assets/Sound/NPC/sword flesh.mp3 b/Assets/Sound/NPC/sword flesh.mp3 new file mode 100644 index 0000000..54fb950 Binary files /dev/null and b/Assets/Sound/NPC/sword flesh.mp3 differ diff --git a/Assets/Sound/NPC/sword flesh.mp3.import b/Assets/Sound/NPC/sword flesh.mp3.import new file mode 100644 index 0000000..8bc5f45 --- /dev/null +++ b/Assets/Sound/NPC/sword flesh.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://bwb317w1kg85f" +path="res://.godot/imported/sword flesh.mp3-40d4c2baec99e09afab6a74ceb99055a.mp3str" + +[deps] + +source_file="res://Assets/Sound/NPC/sword flesh.mp3" +dest_files=["res://.godot/imported/sword flesh.mp3-40d4c2baec99e09afab6a74ceb99055a.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Assets/Sound/Player/gun_sound.mp3 b/Assets/Sound/Player/gun_sound.mp3 new file mode 100644 index 0000000..71e7e2f Binary files /dev/null and b/Assets/Sound/Player/gun_sound.mp3 differ diff --git a/Assets/Sound/Player/gun_sound.mp3.import b/Assets/Sound/Player/gun_sound.mp3.import new file mode 100644 index 0000000..68b6e87 --- /dev/null +++ b/Assets/Sound/Player/gun_sound.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://25jm416k7b7u" +path="res://.godot/imported/gun_sound.mp3-e31a2f8960eebee192fcb882303d6b51.mp3str" + +[deps] + +source_file="res://Assets/Sound/Player/gun_sound.mp3" +dest_files=["res://.godot/imported/gun_sound.mp3-e31a2f8960eebee192fcb882303d6b51.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Assets/Sound/Player/gunpow.mp3 b/Assets/Sound/Player/gunpow.mp3 new file mode 100644 index 0000000..1103523 Binary files /dev/null and b/Assets/Sound/Player/gunpow.mp3 differ diff --git a/Assets/Sound/Player/gunpow.mp3.import b/Assets/Sound/Player/gunpow.mp3.import new file mode 100644 index 0000000..bb98606 --- /dev/null +++ b/Assets/Sound/Player/gunpow.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://d2tlcmvlptmhq" +path="res://.godot/imported/gunpow.mp3-6fc9628baad5124d58fe9bf9a2f8d32f.mp3str" + +[deps] + +source_file="res://Assets/Sound/Player/gunpow.mp3" +dest_files=["res://.godot/imported/gunpow.mp3-6fc9628baad5124d58fe9bf9a2f8d32f.mp3str"] + +[params] + +loop=false +loop_offset=0.0 +bpm=0.0 +beat_count=0 +bar_beats=4 diff --git a/Assets/Sound/SFX/cannon-shot.mp3 b/Assets/Sound/SFX/cannon-shot.mp3 new file mode 100644 index 0000000..5682fe6 Binary files /dev/null and b/Assets/Sound/SFX/cannon-shot.mp3 differ diff --git a/Assets/Sound/SFX/cannon-shot.mp3.import b/Assets/Sound/SFX/cannon-shot.mp3.import new file mode 100644 index 0000000..ee9d137 --- /dev/null +++ b/Assets/Sound/SFX/cannon-shot.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://csrsgvru4im4c" +path="res://.godot/imported/cannon-shot.mp3-c195f5a6db90346524f02e673767648b.mp3str" + +[deps] + +source_file="res://Assets/Sound/SFX/cannon-shot.mp3" +dest_files=["res://.godot/imported/cannon-shot.mp3-c195f5a6db90346524f02e673767648b.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Assets/Sprites/Background/nova amsterda bandeira.png b/Assets/Sprites/Background/nova amsterda bandeira.png new file mode 100644 index 0000000..00272b1 Binary files /dev/null and b/Assets/Sprites/Background/nova amsterda bandeira.png differ diff --git a/Assets/Sprites/Background/nova amsterda bandeira.png.import b/Assets/Sprites/Background/nova amsterda bandeira.png.import new file mode 100644 index 0000000..b371829 --- /dev/null +++ b/Assets/Sprites/Background/nova amsterda bandeira.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://du4e7fcobt4kq" +path="res://.godot/imported/nova amsterda bandeira.png-57191c1c5b614db7810d95858b42a743.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Sprites/Background/nova amsterda bandeira.png" +dest_files=["res://.godot/imported/nova amsterda bandeira.png-57191c1c5b614db7810d95858b42a743.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/Assets/Sprites/Background/nova amsterda.png b/Assets/Sprites/Background/nova amsterda.png new file mode 100644 index 0000000..55d535e Binary files /dev/null and b/Assets/Sprites/Background/nova amsterda.png differ diff --git a/Assets/Sprites/Background/nova amsterda.png.import b/Assets/Sprites/Background/nova amsterda.png.import new file mode 100644 index 0000000..15df3f2 --- /dev/null +++ b/Assets/Sprites/Background/nova amsterda.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cojgdftymrbvb" +path="res://.godot/imported/nova amsterda.png-4af1f5af2ceaa24472a8b39c84220c2f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Sprites/Background/nova amsterda.png" +dest_files=["res://.godot/imported/nova amsterda.png-4af1f5af2ceaa24472a8b39c84220c2f.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/Assets/Sprites/Misc/cannon/explosion-1-f/explosion-f9.png b/Assets/Sprites/Misc/cannon/explosion-1-f/explosion-f9.png new file mode 100644 index 0000000..d47a48c Binary files /dev/null and b/Assets/Sprites/Misc/cannon/explosion-1-f/explosion-f9.png differ diff --git a/Assets/Sprites/Misc/cannon/explosion-1-f/explosion-f9.png.import b/Assets/Sprites/Misc/cannon/explosion-1-f/explosion-f9.png.import new file mode 100644 index 0000000..d5a8af2 --- /dev/null +++ b/Assets/Sprites/Misc/cannon/explosion-1-f/explosion-f9.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b4ejd1nymsmm3" +path="res://.godot/imported/explosion-f9.png-253d1ca61e546c15a880b69aec245865.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Sprites/Misc/cannon/explosion-1-f/explosion-f9.png" +dest_files=["res://.godot/imported/explosion-f9.png-253d1ca61e546c15a880b69aec245865.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/Assets/Sprites/Misc/midnight-ablaze.pal b/Assets/Sprites/Misc/midnight-ablaze.pal new file mode 100644 index 0000000..be8bde3 --- /dev/null +++ b/Assets/Sprites/Misc/midnight-ablaze.pal @@ -0,0 +1,10 @@ +JASC-PAL +0100 +7 +255 130 116 +213 60 106 +124 24 60 +70 14 43 +49 5 30 +31 5 16 +19 2 8 diff --git a/Code/Characters/Player/Player.gd b/Code/Characters/Player/Player.gd index 550fddb..914dba0 100644 --- a/Code/Characters/Player/Player.gd +++ b/Code/Characters/Player/Player.gd @@ -2,6 +2,7 @@ extends GenericCharacter class_name Player signal making_noise(position) signal is_dead +signal announcer_finished @onready var arcabuz : Gun = $Arcabuz @onready var reloadTimer : Timer = $Arcabuz/ReloadTimer @@ -51,8 +52,9 @@ func _input(_event): camera.add_shake(10) camera.flash(Color(Color("d53c6a"), 0.7), 0.1) reloadBar.value = 0.0 + $AudioStreamPlayer.play() emit_signal("making_noise", global_position) - if Input.is_action_just_pressed("secondary"): + if Input.is_action_just_pressed("secondary") and not $AnimationPlayer.is_playing(): $Espada.use() if Input.is_action_just_pressed("look"): $LookPoint.position = Vector2(800,0) @@ -73,9 +75,11 @@ func _input(_event): func restart_level(): - get_tree().reload_current_scene() - + get_parent().restart_level() +func objective_annoucer(): + $HUD/AnimationPlayer.play("objetivo_completo") + func _on_arcabuz_gun_ready(): reloadBar.self_modulate = Color(Color.WHITE, 0.0) reloadBar.value = 0.0 @@ -83,3 +87,8 @@ func _on_arcabuz_gun_ready(): func disorient(): camera.add_shake(160) camera.flash(Color(Color("d53c6a"), 1), 1) + + +func _on_animation_player_animation_finished(anim_name): + if anim_name == "objetivo_completo": + emit_signal("announcer_finished") diff --git a/Code/Characters/generic_character.gd b/Code/Characters/generic_character.gd index 814d7dc..52bc309 100644 --- a/Code/Characters/generic_character.gd +++ b/Code/Characters/generic_character.gd @@ -13,3 +13,4 @@ func hit(): func _on_espada_body_entered(body): if body.has_method("hit"): body.hit() + $CarneSom.play() diff --git a/Code/Misc/Espada.gd b/Code/Misc/Espada.gd index 00835d8..aad6711 100644 --- a/Code/Misc/Espada.gd +++ b/Code/Misc/Espada.gd @@ -4,3 +4,4 @@ extends Area2D func use(): get_parent().get_node("AnimationPlayer").play("EspadaSwing") + get_parent().get_node("EspadaSom").play() diff --git a/Code/Misc/cannon_ball.gd b/Code/Misc/cannon_ball.gd index ed74e8d..3a0a373 100644 --- a/Code/Misc/cannon_ball.gd +++ b/Code/Misc/cannon_ball.gd @@ -10,9 +10,6 @@ func _ready(): $CPUParticles2D.emitting = false $AnimationPlayer.play("Explosion") -func _on_animated_sprite_2d_animation_finished(): - queue_free() - func _on_body_entered(body): if body.has_method('hit'): @@ -40,3 +37,7 @@ func _on_shake_area_body_exited(body): bodies_in_shake_area.erase(body) + + +func _on_animation_player_animation_finished(_anim_name): + queue_free() diff --git a/Code/Misc/global_music.gd b/Code/Misc/global_music.gd new file mode 100644 index 0000000..dd8d4b5 --- /dev/null +++ b/Code/Misc/global_music.gd @@ -0,0 +1,4 @@ +extends Node + +var musicProgress = 0.0 + diff --git a/Code/Misc/menu_inicial.gd b/Code/Misc/menu_inicial.gd new file mode 100644 index 0000000..9e3ebe8 --- /dev/null +++ b/Code/Misc/menu_inicial.gd @@ -0,0 +1,9 @@ +extends Control + + + +func _on_iniciar_jogo_pressed(): + get_tree().change_scene_to_file("res://Scenes/Dialog/cap_1_prologo.tscn") + +func _on_sair_pressed(): + get_tree().quit() diff --git a/Code/Stages/Mapa02.gd b/Code/Stages/Mapa02.gd index ef501c1..6baf36e 100644 --- a/Code/Stages/Mapa02.gd +++ b/Code/Stages/Mapa02.gd @@ -3,7 +3,8 @@ extends "res://Code/Stages/TileMap.gd" var pegou_chave = false - +func _ready(): + $Music.play(GlobalMusic.musicProgress) func _on_chave_body_entered(body): $Chave/Sprite2D.visible = false @@ -14,3 +15,8 @@ func _on_chave_body_entered(body): func _on_saida_body_entered(body): if pegou_chave: get_tree().change_scene_to_file("res://Scenes/Dialog/cutscene_3.tscn") + +func restart_level(): + GlobalMusic.musicProgress = $Music.get_playback_position() + get_tree().reload_current_scene() + diff --git a/Scenes/Characters/NPC/npc.tscn b/Scenes/Characters/NPC/npc.tscn index d1cda10..773d87e 100644 --- a/Scenes/Characters/NPC/npc.tscn +++ b/Scenes/Characters/NPC/npc.tscn @@ -1,17 +1,26 @@ -[gd_scene load_steps=4 format=3 uid="uid://d3k1fuo42m3st"] +[gd_scene load_steps=8 format=3 uid="uid://d3k1fuo42m3st"] [ext_resource type="PackedScene" uid="uid://ixb44jte5b2g" path="res://Scenes/Characters/generic_character.tscn" id="1_o2hs4"] [ext_resource type="Script" path="res://Code/Characters/NPC/npc.gd" id="2_mxisf"] +[ext_resource type="AudioStream" uid="uid://bgg6sgybygvkl" path="res://Assets/Sound/General/pain1.mp3" id="7_3d1ny"] +[ext_resource type="AudioStream" uid="uid://d0ku4872ejcsm" path="res://Assets/Sound/General/pain2.mp3" id="8_hp73y"] +[ext_resource type="AudioStream" uid="uid://fnmrlii083fq" path="res://Assets/Sound/General/pain3.wav" id="9_7y3qm"] [sub_resource type="CircleShape2D" id="CircleShape2D_t35ss"] radius = 1000.0 +[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_oma2f"] +streams_count = 3 +stream_0/stream = ExtResource("7_3d1ny") +stream_0/weight = 1.0 +stream_1/stream = ExtResource("8_hp73y") +stream_1/weight = 1.0 +stream_2/stream = ExtResource("9_7y3qm") +stream_2/weight = 1.0 + [node name="NPC" instance=ExtResource("1_o2hs4")] script = ExtResource("2_mxisf") -[node name="EspadaColision" parent="Espada" index="1"] -disabled = false - [node name="HearingArea" type="Area2D" parent="." index="4"] collision_layer = 0 collision_mask = 0 @@ -42,6 +51,9 @@ one_shot = true [node name="NavTimer" type="Timer" parent="." index="9"] wait_time = 0.2 +[node name="GritoSom" type="AudioStreamPlayer2D" parent="." index="10"] +stream = SubResource("AudioStreamRandomizer_oma2f") + [connection signal="body_entered" from="PreAttackArea" to="." method="_on_pre_attack_area_body_entered"] [connection signal="timeout" from="ReactionTimer" to="." method="_on_reaction_timer_timeout"] [connection signal="timeout" from="NavTimer" to="." method="_on_nav_timer_timeout"] diff --git a/Scenes/Characters/Player/Player.tscn b/Scenes/Characters/Player/Player.tscn index e839e8f..b1574ed 100644 --- a/Scenes/Characters/Player/Player.tscn +++ b/Scenes/Characters/Player/Player.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=18 format=3 uid="uid://cqmcpt8qutle4"] +[gd_scene load_steps=20 format=3 uid="uid://cqmcpt8qutle4"] [ext_resource type="PackedScene" uid="uid://ixb44jte5b2g" path="res://Scenes/Characters/generic_character.tscn" id="1_2g2g3"] [ext_resource type="Script" path="res://Code/Characters/Player/Player.gd" id="2_nd0rh"] @@ -9,6 +9,7 @@ [ext_resource type="PackedScene" uid="uid://4vaexi8w83ua" path="res://Scenes/Misc/bullet.tscn" id="6_i0lj8"] [ext_resource type="FontFile" uid="uid://ct7amco1fsj62" path="res://Assets/Fonts/AncientModernTales.ttf" id="8_nx68v"] [ext_resource type="Texture2D" uid="uid://pwk4sgqni1ib" path="res://Assets/Sprites/UI/mosquete.png" id="9_b1527"] +[ext_resource type="AudioStream" uid="uid://d2tlcmvlptmhq" path="res://Assets/Sound/Player/gunpow.mp3" id="10_47ana"] [sub_resource type="Gradient" id="Gradient_jcrhi"] offsets = PackedFloat32Array(0.670968, 1) @@ -58,8 +59,61 @@ tracks/0/keys = { "values": [Color(100, 100, 100, 1), Color(1, 1, 1, 1)] } +[sub_resource type="Animation" id="Animation_rwhjk"] +resource_name = "objetivo_completo" +length = 3.0 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("CenterContainer:visible") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [true] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("CenterContainer:modulate") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0, 0.3), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("CenterContainer/Label:text") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": ["Objetivo concluído!"] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("BlackFade:color") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(2.4, 2.9), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(0.0745098, 0.00784314, 0.0313726, 0), Color(0.0745098, 0.00784314, 0.0313726, 1)] +} + [sub_resource type="AnimationLibrary" id="AnimationLibrary_ktiuf"] _data = { +"objetivo_completo": SubResource("Animation_rwhjk"), "objetivo_pisca": SubResource("Animation_nvee0") } @@ -191,7 +245,7 @@ theme_override_font_sizes/font_size = 30 text = "Defenda o forte matando os holandeses." [node name="CenterContainer" type="CenterContainer" parent="HUD" index="2"] -visible = false +modulate = Color(1, 1, 1, 0) anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 @@ -207,12 +261,24 @@ layout_mode = 2 theme_override_colors/font_color = Color(1, 0.509804, 0.454902, 1) theme_override_colors/font_shadow_color = Color(0.0745098, 0.00784314, 0.0313726, 1) theme_override_font_sizes/font_size = 50 -text = "Pressione 'R' para tentar novamente." +text = "Objetivo concluído!" -[node name="AnimationPlayer" type="AnimationPlayer" parent="HUD" index="3"] +[node name="BlackFade" type="ColorRect" parent="HUD" index="3"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0.0745098, 0.00784314, 0.0313726, 0) + +[node name="AnimationPlayer" type="AnimationPlayer" parent="HUD" index="4"] libraries = { "": SubResource("AnimationLibrary_ktiuf") } +[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="." index="8"] +stream = ExtResource("10_47ana") + [connection signal="gun_ready" from="Arcabuz" to="." method="_on_arcabuz_gun_ready"] [connection signal="timeout" from="Arcabuz/ReloadTimer" to="Arcabuz" method="_on_reload_timer_timeout"] +[connection signal="animation_finished" from="HUD/AnimationPlayer" to="." method="_on_animation_player_animation_finished"] diff --git a/Scenes/Characters/generic_character.tscn b/Scenes/Characters/generic_character.tscn index c649852..399dc33 100644 --- a/Scenes/Characters/generic_character.tscn +++ b/Scenes/Characters/generic_character.tscn @@ -1,8 +1,12 @@ -[gd_scene load_steps=7 format=3 uid="uid://ixb44jte5b2g"] +[gd_scene load_steps=12 format=3 uid="uid://ixb44jte5b2g"] [ext_resource type="Script" path="res://Code/Characters/generic_character.gd" id="1_01tre"] [ext_resource type="Script" path="res://Code/Misc/Espada.gd" id="2_508ma"] [ext_resource type="Texture2D" uid="uid://pvwwcxywe616" path="res://Assets/Sprites/Characters/General/espada.png" id="3_6bf0j"] +[ext_resource type="AudioStream" uid="uid://bwb317w1kg85f" path="res://Assets/Sound/NPC/sword flesh.mp3" id="4_srt6d"] +[ext_resource type="AudioStream" uid="uid://dklipefwq41dr" path="res://Assets/Sound/NPC/swoosh 1.mp3" id="5_nfvsx"] +[ext_resource type="AudioStream" uid="uid://sqwwcw6kfgqa" path="res://Assets/Sound/NPC/swoosh 2.mp3" id="6_rk7i1"] +[ext_resource type="AudioStream" uid="uid://ccj7b845sm1rq" path="res://Assets/Sound/NPC/swoosh 3.mp3" id="7_3b7nl"] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_7f7f2"] radius = 21.0 @@ -36,12 +40,33 @@ tracks/1/keys = { "update": 1, "values": [false, true] } +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("EspadaSom:playing") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [true] +} [sub_resource type="AnimationLibrary" id="AnimationLibrary_kbxeo"] _data = { "EspadaSwing": SubResource("Animation_g5fja") } +[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_tfriy"] +streams_count = 3 +stream_0/stream = ExtResource("5_nfvsx") +stream_0/weight = 1.0 +stream_1/stream = ExtResource("6_rk7i1") +stream_1/weight = 1.0 +stream_2/stream = ExtResource("7_3b7nl") +stream_2/weight = 1.0 + [node name="GenericCharacter" type="CharacterBody2D"] collision_layer = 0 collision_mask = 0 @@ -72,4 +97,10 @@ rotation = -1.39626 polygon = PackedVector2Array(-29.7203, 21.4873, -34.6443, 22.3556, -35.1677, 36.6638, -26.8872, 60.5894, -12.177, 86.4275, -0.0120173, 86.3134, -1.11099, 74.322, -18.6591, 43.9072, -27.2297, 24.0944) disabled = true +[node name="CarneSom" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource("4_srt6d") + +[node name="EspadaSom" type="AudioStreamPlayer2D" parent="."] +stream = SubResource("AudioStreamRandomizer_tfriy") + [connection signal="body_entered" from="Espada" to="." method="_on_espada_body_entered"] diff --git a/Scenes/Misc/cannon_ball.tscn b/Scenes/Misc/cannon_ball.tscn index f67c86c..00fd9c4 100644 --- a/Scenes/Misc/cannon_ball.tscn +++ b/Scenes/Misc/cannon_ball.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=18 format=3 uid="uid://cnnrse3vsfn5c"] +[gd_scene load_steps=23 format=3 uid="uid://cnnrse3vsfn5c"] [ext_resource type="Script" path="res://Code/Misc/cannon_ball.gd" id="1_ittpv"] [ext_resource type="Texture2D" uid="uid://djsdd8u3dmudv" path="res://Assets/Sprites/Misc/cannon/explosion-1-f/explosion-f0.png" id="1_kqlok"] @@ -10,6 +10,10 @@ [ext_resource type="Texture2D" uid="uid://1vm8uodufp52" path="res://Assets/Sprites/Misc/cannon/explosion-1-f/explosion-f6.png" id="7_xxcqg"] [ext_resource type="Texture2D" uid="uid://b685kyyhcxkij" path="res://Assets/Sprites/Misc/cannon/explosion-1-f/explosion-f7.png" id="8_5tjme"] [ext_resource type="Texture2D" uid="uid://bffuhw6imhkac" path="res://Assets/Sprites/Misc/cannon/explosion-1-f/explosion-f8.png" id="9_8ux4l"] +[ext_resource type="AudioStream" uid="uid://cnmbr5npk04cf" path="res://Assets/Sound/NPC/cannonshot1.wav" id="11_47vi2"] +[ext_resource type="Texture2D" uid="uid://b4ejd1nymsmm3" path="res://Assets/Sprites/Misc/cannon/explosion-1-f/explosion-f9.png" id="11_t32im"] +[ext_resource type="AudioStream" uid="uid://dm37s0itc058d" path="res://Assets/Sound/NPC/cannonshot2.wav" id="12_pfdj7"] +[ext_resource type="AudioStream" uid="uid://25jm416k7b7u" path="res://Assets/Sound/Player/gun_sound.mp3" id="13_v64h8"] [sub_resource type="CircleShape2D" id="CircleShape2D_op6s2"] radius = 84.3801 @@ -19,7 +23,7 @@ radius = 254.126 [sub_resource type="Animation" id="Animation_evxuq"] resource_name = "Explosion" -length = 5.0 +length = 9.0 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true @@ -27,7 +31,7 @@ tracks/0/path = NodePath("AnimatedSprite2D:scale") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { -"times": PackedFloat32Array(0, 3), +"times": PackedFloat32Array(1, 3), "transitions": PackedFloat32Array(1, 1), "update": 0, "values": [Vector2(0.5, 0.5), Vector2(3.5, 3.5)] @@ -53,7 +57,7 @@ tracks/2/path = NodePath("CPUParticles2D:emitting") tracks/2/interp = 1 tracks/2/loop_wrap = true tracks/2/keys = { -"times": PackedFloat32Array(3, 4.8), +"times": PackedFloat32Array(3, 4), "transitions": PackedFloat32Array(1, 1), "update": 1, "values": [true, false] @@ -72,6 +76,30 @@ tracks/3/keys = { "method": &"explode" }] } +tracks/4/type = "value" +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/path = NodePath("Shot:playing") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [true] +} +tracks/5/type = "value" +tracks/5/imported = false +tracks/5/enabled = true +tracks/5/path = NodePath("Explosion:playing") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/keys = { +"times": PackedFloat32Array(3), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [true] +} [sub_resource type="AnimationLibrary" id="AnimationLibrary_ev4h1"] _data = { @@ -107,6 +135,9 @@ animations = [{ }, { "duration": 1.0, "texture": ExtResource("9_8ux4l") +}, { +"duration": 1.0, +"texture": ExtResource("11_t32im") }], "loop": false, "name": &"explosion", @@ -121,6 +152,15 @@ metadata/_snap_enabled = true [sub_resource type="Gradient" id="Gradient_bsjxe"] +[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_f2017"] +streams_count = 2 +random_pitch = 1.4 +random_volume_offset_db = 6.98 +stream_0/stream = ExtResource("11_47vi2") +stream_0/weight = 1.0 +stream_1/stream = ExtResource("12_pfdj7") +stream_1/weight = 1.0 + [node name="CannonBall" type="Area2D"] scale = Vector2(2, 2) collision_layer = 0 @@ -161,8 +201,15 @@ scale_amount_max = 3.0 color = Color(1, 0.509804, 0.454902, 1) color_ramp = SubResource("Gradient_bsjxe") +[node name="Shot" type="AudioStreamPlayer2D" parent="."] +position = Vector2(-2084.5, 0) +stream = SubResource("AudioStreamRandomizer_f2017") + +[node name="Explosion" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource("13_v64h8") + [connection signal="body_entered" from="." to="." method="_on_body_entered"] [connection signal="body_exited" from="." to="." method="_on_body_exited"] [connection signal="body_entered" from="ShakeArea" to="." method="_on_shake_area_body_entered"] [connection signal="body_exited" from="ShakeArea" to="." method="_on_shake_area_body_exited"] -[connection signal="animation_finished" from="AnimatedSprite2D" to="." method="_on_animated_sprite_2d_animation_finished"] +[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_animation_player_animation_finished"] diff --git a/Scenes/Stages/Map01.gd b/Scenes/Stages/Map01.gd index 73893d3..e091c1c 100644 --- a/Scenes/Stages/Map01.gd +++ b/Scenes/Stages/Map01.gd @@ -5,14 +5,25 @@ extends Node2D @export var nextScene : PackedScene + +func _ready(): + $Music.play(GlobalMusic.musicProgress) + func check_objective(): if n_of_enemies == 0: - get_tree().change_scene_to_packed(nextScene) + goto_next_scene() func att_killcount(): n_of_enemies -=1 check_objective() - + +func goto_next_scene(): + get_tree().change_scene_to_packed(nextScene) func _on_enemy_spawn_enemy_spawned(enemy): enemy.connect("is_dead", att_killcount) + +func restart_level(): + GlobalMusic.musicProgress = $Music.get_playback_position() + get_tree().reload_current_scene() + diff --git a/Scenes/Stages/Mapa01.tscn b/Scenes/Stages/Mapa01.tscn index 3c46cdf..0477e93 100644 --- a/Scenes/Stages/Mapa01.tscn +++ b/Scenes/Stages/Mapa01.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=83 format=3 uid="uid://bbxarbnaa00t5"] +[gd_scene load_steps=84 format=3 uid="uid://bbxarbnaa00t5"] [ext_resource type="Texture2D" uid="uid://cf0ujp5wc2kru" path="res://Assets/Sprites/Background/Tiles/Forte/ParedeAgua/aguaesqcima.png" id="1_8w8mv"] [ext_resource type="Texture2D" uid="uid://ce65p7uxc3n31" path="res://Assets/Sprites/Background/Tiles/Forte/ParedeChao/walldirbaixo..png" id="2_pmey0"] @@ -11,6 +11,7 @@ [ext_resource type="Texture2D" uid="uid://d0bii53um23br" path="res://Assets/Sprites/Background/Tiles/Forte/ParedeAgua/aguaesqbaixo.png" id="10_akua5"] [ext_resource type="Texture2D" uid="uid://d061seq4e5tnk" path="res://Assets/Sprites/Background/Tiles/Forte/ParedeAgua/aguadircima.png" id="11_m0iuo"] [ext_resource type="Script" path="res://Code/Stages/TileMap.gd" id="12_5p6x1"] +[ext_resource type="AudioStream" uid="uid://ckgskn48gbs1e" path="res://Assets/Sound/General/waves.wav" id="12_hpbym"] [sub_resource type="TileMapPattern" id="TileMapPattern_tb3np"] tile_data = PackedInt32Array(0, 0, 0, 65536, 0, 1, 131072, 0, 2, 196608, 0, 3, 262144, 0, 0, 327680, 0, 1, 393216, 0, 2, 458752, 0, 3, 524288, 0, 0, 589824, 0, 1, 655360, 0, 2, 720896, 0, 3, 786432, 0, 0, 851968, 0, 1, 917504, 0, 2, 983040, 0, 3) @@ -2051,3 +2052,33 @@ script = ExtResource("12_5p6x1") position = Vector2(3864.75, 0.125008) scale = Vector2(1.48486, 0.786865) texture = SubResource("GradientTexture2D_lairt") + +[node name="Waves" type="AudioStreamPlayer2D" parent="."] +position = Vector2(4274, -1778) +stream = ExtResource("12_hpbym") +autoplay = true + +[node name="Waves2" type="AudioStreamPlayer2D" parent="."] +position = Vector2(756, -747) +stream = ExtResource("12_hpbym") +autoplay = true + +[node name="Waves3" type="AudioStreamPlayer2D" parent="."] +position = Vector2(1739, 1453) +stream = ExtResource("12_hpbym") +autoplay = true + +[node name="Waves4" type="AudioStreamPlayer2D" parent="."] +position = Vector2(5317, 1261) +stream = ExtResource("12_hpbym") +autoplay = true + +[node name="Waves5" type="AudioStreamPlayer2D" parent="."] +position = Vector2(6624, -123) +stream = ExtResource("12_hpbym") +autoplay = true + +[node name="Waves6" type="AudioStreamPlayer2D" parent="."] +position = Vector2(6624, -123) +stream = ExtResource("12_hpbym") +autoplay = true diff --git a/Scenes/Stages/Mapa02.tscn b/Scenes/Stages/Mapa02.tscn index 1fc5b71..306663b 100644 --- a/Scenes/Stages/Mapa02.tscn +++ b/Scenes/Stages/Mapa02.tscn @@ -2091,5 +2091,7 @@ shape = SubResource("CircleShape2D_8dryn") [node name="Sprite2D" type="Sprite2D" parent="Chave"] texture = ExtResource("14_ictpl") +[node name="Music" type="AudioStreamPlayer" parent="."] + [connection signal="body_entered" from="Saida" to="." method="_on_saida_body_entered"] [connection signal="body_entered" from="Chave" to="." method="_on_chave_body_entered"] diff --git a/Scenes/Stages/forte.tscn b/Scenes/Stages/forte.tscn index 491f9d4..fa13e07 100644 --- a/Scenes/Stages/forte.tscn +++ b/Scenes/Stages/forte.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=7 format=3 uid="uid://linddmnccagp"] +[gd_scene load_steps=8 format=3 uid="uid://linddmnccagp"] [ext_resource type="PackedScene" uid="uid://bbxarbnaa00t5" path="res://Scenes/Stages/Mapa01.tscn" id="1_0vwlg"] [ext_resource type="Script" path="res://Scenes/Stages/Map01.gd" id="1_jrtfk"] @@ -6,6 +6,7 @@ [ext_resource type="PackedScene" uid="uid://cqmcpt8qutle4" path="res://Scenes/Characters/Player/Player.tscn" id="2_m3hpg"] [ext_resource type="PackedScene" uid="uid://b2hf1pka0kmx4" path="res://Scenes/Characters/NPC/Ally/ally.tscn" id="3_e4lu1"] [ext_resource type="Script" path="res://Scenes/Stages/EnemySpawn.gd" id="6_ago4d"] +[ext_resource type="AudioStream" uid="uid://xpubnr7otkvu" path="res://Assets/Sound/Music/bucaneers.mp3" id="7_12kks"] [node name="Forte" type="Node2D"] script = ExtResource("1_jrtfk") @@ -49,5 +50,9 @@ position = Vector2(2267, -501) position = Vector2(2249, 1) objetivoText = "Defenda o forte matando os holandeses." +[node name="Music" type="AudioStreamPlayer" parent="."] +stream = ExtResource("7_12kks") +volume_db = -21.0 + [connection signal="enemy_spawned" from="EnemySpawn" to="." method="_on_enemy_spawn_enemy_spawned"] [connection signal="timeout" from="EnemySpawn/SpawnTimer" to="EnemySpawn" method="_on_spawn_timer_timeout"] diff --git a/Scenes/Stages/mapa_segundo_mesmo.tscn b/Scenes/Stages/mapa_segundo_mesmo.tscn index 35b08b5..705f65d 100644 --- a/Scenes/Stages/mapa_segundo_mesmo.tscn +++ b/Scenes/Stages/mapa_segundo_mesmo.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=8 format=3 uid="uid://chyw7n01ldit2"] +[gd_scene load_steps=9 format=3 uid="uid://chyw7n01ldit2"] [ext_resource type="Script" path="res://Scenes/Stages/Map01.gd" id="1_hcb84"] [ext_resource type="PackedScene" uid="uid://bbxarbnaa00t5" path="res://Scenes/Stages/Mapa01.tscn" id="1_ykrvb"] @@ -7,6 +7,7 @@ [ext_resource type="PackedScene" uid="uid://cqmcpt8qutle4" path="res://Scenes/Characters/Player/Player.tscn" id="4_esk6h"] [ext_resource type="PackedScene" uid="uid://b2hf1pka0kmx4" path="res://Scenes/Characters/NPC/Ally/ally.tscn" id="6_c1ens"] [ext_resource type="Script" path="res://Scenes/Stages/EnemySpawn.gd" id="7_3lvc3"] +[ext_resource type="AudioStream" uid="uid://xpubnr7otkvu" path="res://Assets/Sound/Music/bucaneers.mp3" id="8_53keb"] [node name="Mapa02" type="Node2D"] script = ExtResource("1_hcb84") @@ -103,6 +104,10 @@ position = Vector2(3124, 575) [node name="Enemies" type="Node" parent="EnemySpawn"] +[node name="Music" type="AudioStreamPlayer" parent="."] +stream = ExtResource("8_53keb") +volume_db = -21.0 + [connection signal="timeout" from="CannonSpawnLocations/Timer" to="CannonSpawnLocations" method="_on_timer_timeout"] [connection signal="enemy_spawned" from="EnemySpawn" to="." method="_on_enemy_spawn_enemy_spawned"] [connection signal="timeout" from="EnemySpawn/SpawnTimer" to="EnemySpawn" method="_on_spawn_timer_timeout"] diff --git a/Scenes/UI/menu_inicial.tscn b/Scenes/UI/menu_inicial.tscn new file mode 100644 index 0000000..bc2347a --- /dev/null +++ b/Scenes/UI/menu_inicial.tscn @@ -0,0 +1,57 @@ +[gd_scene load_steps=3 format=3 uid="uid://wm8rtiflpj64"] + +[ext_resource type="Script" path="res://Code/Misc/menu_inicial.gd" id="1_pvnnm"] +[ext_resource type="Texture2D" uid="uid://du4e7fcobt4kq" path="res://Assets/Sprites/Background/nova amsterda bandeira.png" id="1_xpfk3"] + +[node name="MenuInicial" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_pvnnm") + +[node name="CenterContainer" type="CenterContainer" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"] +layout_mode = 2 + +[node name="Label" type="Label" parent="CenterContainer/VBoxContainer"] +layout_mode = 2 +theme_override_colors/font_color = Color(1, 0.509804, 0.454902, 1) +theme_override_font_sizes/font_size = 64 +text = "Nova Amsterdã" + +[node name="TextureRect" type="TextureRect" parent="CenterContainer/VBoxContainer"] +custom_minimum_size = Vector2(200, 0) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 0 +texture = ExtResource("1_xpfk3") +expand_mode = 4 +stretch_mode = 4 + +[node name="Iniciar jogo" type="Button" parent="CenterContainer/VBoxContainer"] +layout_mode = 2 +theme_override_colors/font_color = Color(0.835294, 0.235294, 0.415686, 1) +theme_override_colors/font_hover_color = Color(1, 0.509804, 0.454902, 1) +theme_override_font_sizes/font_size = 64 +text = "Iniciar" + +[node name="Sair" type="Button" parent="CenterContainer/VBoxContainer"] +layout_mode = 2 +theme_override_colors/font_color = Color(0.835294, 0.235294, 0.415686, 1) +theme_override_colors/font_hover_color = Color(1, 0.509804, 0.454902, 1) +theme_override_font_sizes/font_size = 64 +text = "Sair +" + +[connection signal="pressed" from="CenterContainer/VBoxContainer/Iniciar jogo" to="." method="_on_iniciar_jogo_pressed"] +[connection signal="pressed" from="CenterContainer/VBoxContainer/Sair" to="." method="_on_sair_pressed"] diff --git a/project.godot b/project.godot index 60a7a6e..3e7d67d 100644 --- a/project.godot +++ b/project.godot @@ -16,6 +16,10 @@ config/features=PackedStringArray("4.1", "Forward Plus") boot_splash/bg_color=Color(0.0745098, 0.00784314, 0.0313726, 1) config/icon="res://icon.svg" +[autoload] + +GlobalMusic="*res://Code/Misc/global_music.gd" + [display] window/size/viewport_width=1366