Adds more sounds and skip dialogue
This commit is contained in:
parent
4f1cd8ffab
commit
7629b8fd8a
BIN
Assets/sfx/umiranja/crvić_umire1.mp3
Normal file
BIN
Assets/sfx/umiranja/crvić_umire1.mp3
Normal file
Binary file not shown.
19
Assets/sfx/umiranja/crvić_umire1.mp3.import
Normal file
19
Assets/sfx/umiranja/crvić_umire1.mp3.import
Normal file
@ -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
|
BIN
Assets/sfx/umiranja/crvić_umire2.mp3
Normal file
BIN
Assets/sfx/umiranja/crvić_umire2.mp3
Normal file
Binary file not shown.
19
Assets/sfx/umiranja/crvić_umire2.mp3.import
Normal file
19
Assets/sfx/umiranja/crvić_umire2.mp3.import
Normal file
@ -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
|
BIN
Assets/sfx/umiranja/crvić_umire3.mp3
Normal file
BIN
Assets/sfx/umiranja/crvić_umire3.mp3
Normal file
Binary file not shown.
19
Assets/sfx/umiranja/crvić_umire3.mp3.import
Normal file
19
Assets/sfx/umiranja/crvić_umire3.mp3.import
Normal file
@ -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
|
BIN
Assets/sfx/umiranja/crvić_umire4.mp3
Normal file
BIN
Assets/sfx/umiranja/crvić_umire4.mp3
Normal file
Binary file not shown.
19
Assets/sfx/umiranja/crvić_umire4.mp3.import
Normal file
19
Assets/sfx/umiranja/crvić_umire4.mp3.import
Normal file
@ -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
|
BIN
Assets/sfx/umiranja/crvić_umire5.mp3
Normal file
BIN
Assets/sfx/umiranja/crvić_umire5.mp3
Normal file
Binary file not shown.
19
Assets/sfx/umiranja/crvić_umire5.mp3.import
Normal file
19
Assets/sfx/umiranja/crvić_umire5.mp3.import
Normal file
@ -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
|
BIN
Assets/sfx/umiranja/crvić_umire6.mp3
Normal file
BIN
Assets/sfx/umiranja/crvić_umire6.mp3
Normal file
Binary file not shown.
19
Assets/sfx/umiranja/crvić_umire6.mp3.import
Normal file
19
Assets/sfx/umiranja/crvić_umire6.mp3.import
Normal file
@ -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
|
BIN
Assets/sfx/umiranja/pikqi.mp3
Normal file
BIN
Assets/sfx/umiranja/pikqi.mp3
Normal file
Binary file not shown.
19
Assets/sfx/umiranja/pikqi.mp3.import
Normal file
19
Assets/sfx/umiranja/pikqi.mp3.import
Normal file
@ -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
|
@ -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
|
||||
|
10
game.gd
10
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():
|
||||
|
12
game.tscn
12
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"]
|
||||
|
Loading…
Reference in New Issue
Block a user