File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ onready var platform_detector = $PlatformDetector
1313onready var animation_player = $ AnimationPlayer
1414onready var shoot_timer = $ ShootAnimation
1515onready var sprite = $ Sprite
16+ onready var sound_jump = $ Jump
1617onready var gun = sprite .get_node (@ "Gun" )
1718
1819
@@ -46,6 +47,10 @@ func _ready():
4647# - If you split the character into a state machine or more advanced pattern,
4748# you can easily move individual functions.
4849func _physics_process (_delta ):
50+ # Play jump sound
51+ if Input .is_action_just_pressed ("jump" + action_suffix ) and is_on_floor ():
52+ sound_jump .play ()
53+
4954 var direction = get_direction ()
5055
5156 var is_jump_interrupted = Input .is_action_just_released ("jump" + action_suffix ) and _velocity .y < 0.0
You can’t perform that action at this time.
0 commit comments