diff --git a/assets/audio/victory.mp3 b/assets/audio/victory.mp3 new file mode 100644 index 0000000..dab885a Binary files /dev/null and b/assets/audio/victory.mp3 differ diff --git a/assets/audio/victory.mp3.import b/assets/audio/victory.mp3.import new file mode 100644 index 0000000..869c946 --- /dev/null +++ b/assets/audio/victory.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://b6sp0yj21vn17" +path="res://.godot/imported/victory.mp3-2c0e4c1c0aa8ee4be09ba0e64d5076dc.mp3str" + +[deps] + +source_file="res://assets/audio/victory.mp3" +dest_files=["res://.godot/imported/victory.mp3-2c0e4c1c0aa8ee4be09ba0e64d5076dc.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/scenes/ui/victory.tscn b/scenes/ui/victory.tscn index 67cf46b..ad24496 100644 --- a/scenes/ui/victory.tscn +++ b/scenes/ui/victory.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=3 format=3 uid="uid://r8kq68v8iflb"] +[gd_scene load_steps=4 format=3 uid="uid://r8kq68v8iflb"] [ext_resource type="Texture2D" uid="uid://bbll7rkbty50k" path="res://assets/icons/victory.png" id="1_3fse5"] [ext_resource type="Script" path="res://scripts/ui/victory.gd" id="1_qdex0"] +[ext_resource type="AudioStream" uid="uid://b6sp0yj21vn17" path="res://assets/audio/victory.mp3" id="3_ya7rd"] [node name="Victory" type="Control"] process_mode = 2 @@ -49,4 +50,8 @@ size_flags_horizontal = 4 size_flags_vertical = 6 text = "Next Stage" +[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] +stream = ExtResource("3_ya7rd") +volume_db = -30.0 + [connection signal="pressed" from="Panel/MarginContainer/VBoxContainer/NextStage" to="." method="_on_next_stage_pressed"] diff --git a/scripts/stages/1/game_manager.gd b/scripts/stages/1/game_manager.gd index 5798749..039e65f 100644 --- a/scripts/stages/1/game_manager.gd +++ b/scripts/stages/1/game_manager.gd @@ -115,3 +115,4 @@ func _on_duration_timeout(): get_tree().paused = true $CanvasLayer/Victory.unlock_next_stage() $CanvasLayer/Victory.show() + $CanvasLayer/Victory/AudioStreamPlayer.play() diff --git a/scripts/stages/2/game_manager.gd b/scripts/stages/2/game_manager.gd index 092f92c..d73a3ef 100644 --- a/scripts/stages/2/game_manager.gd +++ b/scripts/stages/2/game_manager.gd @@ -113,4 +113,5 @@ func on_enemy_reward(value: int): func _on_duration_timeout(): get_tree().paused = true $CanvasLayer/Victory.unlock_next_stage() - $CanvasLayer/Victory.show() \ No newline at end of file + $CanvasLayer/Victory.show() + $CanvasLayer/Victory/AudioStreamPlayer.play() \ No newline at end of file diff --git a/scripts/stages/3/game_manager.gd b/scripts/stages/3/game_manager.gd index 40baf47..4099672 100644 --- a/scripts/stages/3/game_manager.gd +++ b/scripts/stages/3/game_manager.gd @@ -114,3 +114,4 @@ func _on_duration_timeout(): get_tree().paused = true $CanvasLayer/Victory.unlock_next_stage() $CanvasLayer/Victory.show() + $CanvasLayer/Victory/AudioStreamPlayer.play() diff --git a/scripts/stages/4/game_manager.gd b/scripts/stages/4/game_manager.gd index 30a4bf8..bfbdc13 100644 --- a/scripts/stages/4/game_manager.gd +++ b/scripts/stages/4/game_manager.gd @@ -113,4 +113,5 @@ func on_enemy_reward(value: int): func _on_duration_timeout(): get_tree().paused = true $CanvasLayer/Victory.unlock_next_stage() - $CanvasLayer/Victory.show() \ No newline at end of file + $CanvasLayer/Victory.show() + $CanvasLayer/Victory/AudioStreamPlayer.play() \ No newline at end of file diff --git a/scripts/stages/5/game_manager.gd b/scripts/stages/5/game_manager.gd index 14d183f..e73d89b 100644 --- a/scripts/stages/5/game_manager.gd +++ b/scripts/stages/5/game_manager.gd @@ -113,4 +113,5 @@ func on_enemy_reward(value: int): func _on_duration_timeout(): get_tree().paused = true $CanvasLayer/Victory.unlock_next_stage() - $CanvasLayer/Victory.show() \ No newline at end of file + $CanvasLayer/Victory.show() + $CanvasLayer/Victory/AudioStreamPlayer.play() \ No newline at end of file diff --git a/scripts/stages/6/game_manager.gd b/scripts/stages/6/game_manager.gd index 157565b..1826be2 100644 --- a/scripts/stages/6/game_manager.gd +++ b/scripts/stages/6/game_manager.gd @@ -113,4 +113,5 @@ func on_enemy_reward(value: int): func _on_duration_timeout(): get_tree().paused = true $CanvasLayer/Victory.unlock_next_stage() - $CanvasLayer/Victory.show() \ No newline at end of file + $CanvasLayer/Victory.show() + $CanvasLayer/Victory/AudioStreamPlayer.play() \ No newline at end of file