sound changes
This commit is contained in:
parent
349de7441e
commit
29bdda6acf
2 changed files with 12 additions and 3 deletions
|
@ -1,6 +1,8 @@
|
|||
extends CharacterBody2D
|
||||
|
||||
@export var sfx : AudioStreamPlayer2D
|
||||
@export var sfx_large : AudioStreamPlayer2D
|
||||
|
||||
@export var speed = 340
|
||||
@export var gravity = 50
|
||||
var jump_count = 1
|
||||
|
@ -104,11 +106,12 @@ func _physics_process(delta):
|
|||
update_cursor()
|
||||
|
||||
func Jump():
|
||||
sfx.play()
|
||||
if scale.x == 1:
|
||||
velocity.y = -1 * jump_strength
|
||||
sfx.play()
|
||||
else :
|
||||
velocity.y = -1 * jump_strength_large
|
||||
sfx_large.play()
|
||||
jump_count = 0
|
||||
is_touching_floor = false
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue