Added some player sounds

This commit is contained in:
2026-06-28 19:06:58 +03:00
parent 89f69192b0
commit 43518b3c9e
15 changed files with 224 additions and 36 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ func physics_process(_delta: float) -> void:
switch_state.emit(running_right)
else:
if is_zero_approx(player.velocity.x):
switch_state.emit([jump_left, jump_right].pick_random())
switch_state.emit(jump_left)
elif player.velocity.x < 0.0:
switch_state.emit(jump_left)
elif player.velocity.x > 0.0:
@@ -32,6 +32,7 @@ func exit() -> void:
func physics_process(_delta: float) -> void:
if player.is_on_floor():
SoundManager.play_sfx_stream(SoundManager.sfx_stream_land, player.global_position)
if is_zero_approx(player.velocity.x):
switch_state.emit(idle)
else:
+1 -1
View File
@@ -44,7 +44,7 @@ func physics_process(_delta: float) -> void:
switch_state.emit(another_direction)
else:
if is_zero_approx(player.velocity.x):
switch_state.emit([jump, jump_another_direction].pick_random())
switch_state.emit(jump if direction == Direction.Left else jump_another_direction)
else:
match direction:
Direction.Left: