fix dublicate scene uids and add sound for jumping
This commit is contained in:
parent
59a94bfd7b
commit
683248c666
18 changed files with 32 additions and 1151 deletions
|
@ -1,5 +1,6 @@
|
|||
extends CharacterBody2D
|
||||
|
||||
@export var sfx : AudioStreamPlayer2D
|
||||
@export var speed = 340
|
||||
@export var gravity = 50
|
||||
var jump_count = 1
|
||||
|
@ -103,6 +104,7 @@ func _physics_process(delta):
|
|||
update_cursor()
|
||||
|
||||
func Jump():
|
||||
sfx.play()
|
||||
if scale.x == 1:
|
||||
velocity.y = -1 * jump_strength
|
||||
else :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue