diff --git a/Assets/sfx/umiranja/crvić_umire1.mp3 b/Assets/sfx/umiranja/crvić_umire1.mp3 new file mode 100644 index 0000000..bec62dd Binary files /dev/null and b/Assets/sfx/umiranja/crvić_umire1.mp3 differ diff --git a/Assets/sfx/umiranja/crvić_umire1.mp3.import b/Assets/sfx/umiranja/crvić_umire1.mp3.import new file mode 100644 index 0000000..41af984 --- /dev/null +++ b/Assets/sfx/umiranja/crvić_umire1.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://bfckfdcolot1o" +path="res://.godot/imported/crvić_umire1.mp3-661cdcf54724fb78d6ee7388045f4f84.mp3str" + +[deps] + +source_file="res://Assets/sfx/umiranja/crvić_umire1.mp3" +dest_files=["res://.godot/imported/crvić_umire1.mp3-661cdcf54724fb78d6ee7388045f4f84.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Assets/sfx/umiranja/crvić_umire2.mp3 b/Assets/sfx/umiranja/crvić_umire2.mp3 new file mode 100644 index 0000000..735caac Binary files /dev/null and b/Assets/sfx/umiranja/crvić_umire2.mp3 differ diff --git a/Assets/sfx/umiranja/crvić_umire2.mp3.import b/Assets/sfx/umiranja/crvić_umire2.mp3.import new file mode 100644 index 0000000..575cdee --- /dev/null +++ b/Assets/sfx/umiranja/crvić_umire2.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://bevhg57svxpq1" +path="res://.godot/imported/crvić_umire2.mp3-0b71ded2ad12541754353a41c79c1d5c.mp3str" + +[deps] + +source_file="res://Assets/sfx/umiranja/crvić_umire2.mp3" +dest_files=["res://.godot/imported/crvić_umire2.mp3-0b71ded2ad12541754353a41c79c1d5c.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Assets/sfx/umiranja/crvić_umire3.mp3 b/Assets/sfx/umiranja/crvić_umire3.mp3 new file mode 100644 index 0000000..8160851 Binary files /dev/null and b/Assets/sfx/umiranja/crvić_umire3.mp3 differ diff --git a/Assets/sfx/umiranja/crvić_umire3.mp3.import b/Assets/sfx/umiranja/crvić_umire3.mp3.import new file mode 100644 index 0000000..e127f10 --- /dev/null +++ b/Assets/sfx/umiranja/crvić_umire3.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://f2f5vqkdg4fc" +path="res://.godot/imported/crvić_umire3.mp3-7a462255816cb53be3041a975f3c3664.mp3str" + +[deps] + +source_file="res://Assets/sfx/umiranja/crvić_umire3.mp3" +dest_files=["res://.godot/imported/crvić_umire3.mp3-7a462255816cb53be3041a975f3c3664.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Assets/sfx/umiranja/crvić_umire4.mp3 b/Assets/sfx/umiranja/crvić_umire4.mp3 new file mode 100644 index 0000000..b3bf529 Binary files /dev/null and b/Assets/sfx/umiranja/crvić_umire4.mp3 differ diff --git a/Assets/sfx/umiranja/crvić_umire4.mp3.import b/Assets/sfx/umiranja/crvić_umire4.mp3.import new file mode 100644 index 0000000..c72fe1c --- /dev/null +++ b/Assets/sfx/umiranja/crvić_umire4.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://cjaioavfavj2s" +path="res://.godot/imported/crvić_umire4.mp3-2ad265e58c1c25f6d4bf97bc33f99915.mp3str" + +[deps] + +source_file="res://Assets/sfx/umiranja/crvić_umire4.mp3" +dest_files=["res://.godot/imported/crvić_umire4.mp3-2ad265e58c1c25f6d4bf97bc33f99915.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Assets/sfx/umiranja/crvić_umire5.mp3 b/Assets/sfx/umiranja/crvić_umire5.mp3 new file mode 100644 index 0000000..3b57bd2 Binary files /dev/null and b/Assets/sfx/umiranja/crvić_umire5.mp3 differ diff --git a/Assets/sfx/umiranja/crvić_umire5.mp3.import b/Assets/sfx/umiranja/crvić_umire5.mp3.import new file mode 100644 index 0000000..b2de69a --- /dev/null +++ b/Assets/sfx/umiranja/crvić_umire5.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://cicbc1qmv1g4n" +path="res://.godot/imported/crvić_umire5.mp3-a609fce44b4e787668a7e6b497265c33.mp3str" + +[deps] + +source_file="res://Assets/sfx/umiranja/crvić_umire5.mp3" +dest_files=["res://.godot/imported/crvić_umire5.mp3-a609fce44b4e787668a7e6b497265c33.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Assets/sfx/umiranja/crvić_umire6.mp3 b/Assets/sfx/umiranja/crvić_umire6.mp3 new file mode 100644 index 0000000..41481a9 Binary files /dev/null and b/Assets/sfx/umiranja/crvić_umire6.mp3 differ diff --git a/Assets/sfx/umiranja/crvić_umire6.mp3.import b/Assets/sfx/umiranja/crvić_umire6.mp3.import new file mode 100644 index 0000000..bf6e95c --- /dev/null +++ b/Assets/sfx/umiranja/crvić_umire6.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://cuycklabjvlb0" +path="res://.godot/imported/crvić_umire6.mp3-33fb03e9a8bc28decab857807f511494.mp3str" + +[deps] + +source_file="res://Assets/sfx/umiranja/crvić_umire6.mp3" +dest_files=["res://.godot/imported/crvić_umire6.mp3-33fb03e9a8bc28decab857807f511494.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Assets/sfx/umiranja/pikqi.mp3 b/Assets/sfx/umiranja/pikqi.mp3 new file mode 100644 index 0000000..277a7a5 Binary files /dev/null and b/Assets/sfx/umiranja/pikqi.mp3 differ diff --git a/Assets/sfx/umiranja/pikqi.mp3.import b/Assets/sfx/umiranja/pikqi.mp3.import new file mode 100644 index 0000000..d1074b1 --- /dev/null +++ b/Assets/sfx/umiranja/pikqi.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://lofuk3lgf1vl" +path="res://.godot/imported/pikqi.mp3-50758ce922f7cdfd5689d67e8aa01c58.mp3str" + +[deps] + +source_file="res://Assets/sfx/umiranja/pikqi.mp3" +dest_files=["res://.godot/imported/pikqi.mp3-50758ce922f7cdfd5689d67e8aa01c58.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Scenes/dialog.gd b/Scenes/dialog.gd index 9d4c566..0c17993 100644 --- a/Scenes/dialog.gd +++ b/Scenes/dialog.gd @@ -6,6 +6,10 @@ var dialog_step = 0 var is_dialog_active = false signal dialogue_over +func skip(): + visible = false + dialogue_over.emit() + func start_dialog_1(): visible = true is_dialog_active = true diff --git a/game.gd b/game.gd index afb4273..967b3ee 100644 --- a/game.gd +++ b/game.gd @@ -12,12 +12,17 @@ var spawn_interval = 1.4 var interval_step = 0.05 var max_out = 0.7 +@export var umiranje: Array[AudioStream] + var player_score = 0 var first_time = true var game_active = false var needs_restart = false func _unhandled_input(event: InputEvent) -> void: + if game_active == false: + if event.is_action_pressed("B"): + %Dialog.skip() if needs_restart && !game_active: if event.is_action_pressed("A"): start_game() @@ -112,6 +117,11 @@ func _on_spawn_timer_timeout() -> void: return func on_enemy_killed(): player_score+=1 + var random_zvuk = randi_range(0, 6) + $death.stream = umiranje[random_zvuk] + $death.pitch_scale = 1.5 + $death.seek(0.3) + $death.play() draw_score() func draw_score(): diff --git a/game.tscn b/game.tscn index d744ee1..54e9ca8 100644 --- a/game.tscn +++ b/game.tscn @@ -1,12 +1,19 @@ -[gd_scene load_steps=15 format=3 uid="uid://decsef3jj3lt5"] +[gd_scene load_steps=22 format=3 uid="uid://decsef3jj3lt5"] [ext_resource type="Script" path="res://game.gd" id="1_bhcvq"] [ext_resource type="PackedScene" uid="uid://bhvihrt8dipll" path="res://Scenes/Button/button.tscn" id="1_j4pve"] +[ext_resource type="AudioStream" uid="uid://bfckfdcolot1o" path="res://Assets/sfx/umiranja/crvić_umire1.mp3" id="2_bqpuh"] [ext_resource type="Shader" path="res://game.gdshader" id="2_k6uao"] [ext_resource type="Texture2D" uid="uid://b4d0kcmvv4qcx" path="res://Scenes/background.png" id="3_hovne"] +[ext_resource type="AudioStream" uid="uid://bevhg57svxpq1" path="res://Assets/sfx/umiranja/crvić_umire2.mp3" id="3_nbloh"] +[ext_resource type="AudioStream" uid="uid://f2f5vqkdg4fc" path="res://Assets/sfx/umiranja/crvić_umire3.mp3" id="4_nolek"] [ext_resource type="Script" path="res://camera_2d.gd" id="4_u8t00"] +[ext_resource type="AudioStream" uid="uid://cjaioavfavj2s" path="res://Assets/sfx/umiranja/crvić_umire4.mp3" id="5_a5gfo"] +[ext_resource type="AudioStream" uid="uid://cicbc1qmv1g4n" path="res://Assets/sfx/umiranja/crvić_umire5.mp3" id="6_r0cbq"] [ext_resource type="Script" path="res://Scenes/dialog.gd" id="7_64bvv"] +[ext_resource type="AudioStream" uid="uid://cuycklabjvlb0" path="res://Assets/sfx/umiranja/crvić_umire6.mp3" id="7_spt0p"] [ext_resource type="FontFile" uid="uid://dr1wo1inm6yfw" path="res://Assets/Seven Segment.ttf" id="7_ydsit"] +[ext_resource type="AudioStream" uid="uid://lofuk3lgf1vl" path="res://Assets/sfx/umiranja/pikqi.mp3" id="8_0f3wr"] [ext_resource type="AudioStream" uid="uid://gl8rjilyleca" path="res://Assets/Music/8bar1.wav" id="8_837jh"] [ext_resource type="AudioStream" uid="uid://ceu18tf3l4bio" path="res://Assets/Music/4bar.wav" id="9_iourf"] [ext_resource type="AudioStream" uid="uid://d25p5e1skh15i" path="res://Assets/Music/8bar2.wav" id="10_05o5g"] @@ -31,6 +38,7 @@ shader_parameter/Noise = SubResource("NoiseTexture2D_0s1i7") process_mode = 3 script = ExtResource("1_bhcvq") INIT_COLOR = Color(0.623529, 0.14902, 0.184314, 0.313726) +umiranje = Array[AudioStream]([ExtResource("2_bqpuh"), ExtResource("3_nbloh"), ExtResource("4_nolek"), ExtResource("5_a5gfo"), ExtResource("6_r0cbq"), ExtResource("7_spt0p"), ExtResource("8_0f3wr")]) [node name="CanvasLayer" type="CanvasLayer" parent="."] layer = -1 @@ -161,6 +169,8 @@ autoplay = true [node name="Intense" type="AudioStreamPlayer2D" parent="."] stream = ExtResource("10_05o5g") +[node name="death" type="AudioStreamPlayer2D" parent="."] + [connection signal="timeout" from="SpawnTimer" to="." method="_on_spawn_timer_timeout"] [connection signal="dialogue_over" from="Camera2D/Dialog" to="." method="_on_dialog_dialogue_over"] [connection signal="finished" from="8bart1" to="." method="_on_bart_1_finished"]