add jump sound
This commit is contained in:
parent
4c870105a8
commit
51341019b2
4 changed files with 28 additions and 1 deletions
BIN
mini-game/ressources/sounds/drop_004.wav
Normal file
BIN
mini-game/ressources/sounds/drop_004.wav
Normal file
Binary file not shown.
21
mini-game/ressources/sounds/drop_004.wav.import
Normal file
21
mini-game/ressources/sounds/drop_004.wav.import
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamSample"
|
||||||
|
path="res://.import/drop_004.wav-885be4baf10db32694bc6a0533126d41.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://mini-game/ressources/sounds/drop_004.wav"
|
||||||
|
dest_files=[ "res://.import/drop_004.wav-885be4baf10db32694bc6a0533126d41.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=false
|
||||||
|
compress/mode=0
|
|
@ -33,6 +33,7 @@ onready var bonus_texture := $BonusControl/Sprite
|
||||||
onready var bonus_tween := $BonusControl/Tween
|
onready var bonus_tween := $BonusControl/Tween
|
||||||
onready var bonus_timer := $BonusControl/Timer
|
onready var bonus_timer := $BonusControl/Timer
|
||||||
onready var jump_timer := $JumpTimer
|
onready var jump_timer := $JumpTimer
|
||||||
|
onready var jump_stream := $AudioStreamPlayer
|
||||||
|
|
||||||
signal hit()
|
signal hit()
|
||||||
signal die()
|
signal die()
|
||||||
|
@ -63,6 +64,7 @@ func _physics_process(delta):
|
||||||
func _input(event: InputEvent):
|
func _input(event: InputEvent):
|
||||||
if player_enabled and state == RUN and event.is_action_pressed(jump_key):
|
if player_enabled and state == RUN and event.is_action_pressed(jump_key):
|
||||||
jump_timer.start()
|
jump_timer.start()
|
||||||
|
jump_stream.play()
|
||||||
pressing_jump = true
|
pressing_jump = true
|
||||||
state = JUMP
|
state = JUMP
|
||||||
elif event.is_action_released(jump_key):
|
elif event.is_action_released(jump_key):
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=26 format=2]
|
[gd_scene load_steps=27 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://mini-game/ressources/sprites/player/dino/dino_run7.png" type="Texture" id=1]
|
[ext_resource path="res://mini-game/ressources/sprites/player/dino/dino_run7.png" type="Texture" id=1]
|
||||||
[ext_resource path="res://mini-game/ressources/sprites/player/dino/dino_run5.png" type="Texture" id=2]
|
[ext_resource path="res://mini-game/ressources/sprites/player/dino/dino_run5.png" type="Texture" id=2]
|
||||||
|
@ -22,6 +22,7 @@
|
||||||
[ext_resource path="res://mini-game/ressources/sprites/player/man/7.png" type="Texture" id=20]
|
[ext_resource path="res://mini-game/ressources/sprites/player/man/7.png" type="Texture" id=20]
|
||||||
[ext_resource path="res://mini-game/ressources/sprites/player/man/9_1.png" type="Texture" id=21]
|
[ext_resource path="res://mini-game/ressources/sprites/player/man/9_1.png" type="Texture" id=21]
|
||||||
[ext_resource path="res://mini-game/ressources/sprites/plus1.png" type="Texture" id=22]
|
[ext_resource path="res://mini-game/ressources/sprites/plus1.png" type="Texture" id=22]
|
||||||
|
[ext_resource path="res://mini-game/ressources/sounds/drop_004.wav" type="AudioStream" id=23]
|
||||||
|
|
||||||
[sub_resource type="SpriteFrames" id=1]
|
[sub_resource type="SpriteFrames" id=1]
|
||||||
animations = [ {
|
animations = [ {
|
||||||
|
@ -88,6 +89,9 @@ wait_time = 1.5
|
||||||
[node name="JumpTimer" type="Timer" parent="."]
|
[node name="JumpTimer" type="Timer" parent="."]
|
||||||
one_shot = true
|
one_shot = true
|
||||||
|
|
||||||
|
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
|
||||||
|
stream = ExtResource( 23 )
|
||||||
|
|
||||||
[connection signal="body_entered" from="Area2D" to="." method="_on_Area2D_body_entered"]
|
[connection signal="body_entered" from="Area2D" to="." method="_on_Area2D_body_entered"]
|
||||||
[connection signal="body_exited" from="Area2D" to="." method="_on_Area2D_body_exited"]
|
[connection signal="body_exited" from="Area2D" to="." method="_on_Area2D_body_exited"]
|
||||||
[connection signal="timeout" from="BonusControl/Timer" to="." method="_on_Timer_timeout"]
|
[connection signal="timeout" from="BonusControl/Timer" to="." method="_on_Timer_timeout"]
|
||||||
|
|
Loading…
Reference in a new issue