This commit is contained in:
1 parent
f9527a3df0
commit
6a4c7b5c07
2 files changed
+8
No files matched your search
@@ -26,6 +26,8 @@ func refresh_dash(new_dashes):
|
||||
dashes = new_dashes
|
||||
else:
|
||||
dashes = 1
|
||||
if dashes > 0:
|
||||
$Jetpack/DashIndicator.show()
|
||||
|
||||
|
||||
func refresh_jump(new_jumps):
|
||||
@@ -33,6 +35,8 @@ func refresh_jump(new_jumps):
|
||||
jumps = new_jumps
|
||||
else:
|
||||
jumps = 1
|
||||
if jumps > 0:
|
||||
$Jetpack/JumpIndicator.show()
|
||||
|
||||
func on_teleport():
|
||||
refresh_jump(1)
|
||||
@@ -55,6 +59,8 @@ func _process(delta: float) -> void:
|
||||
elif !is_on_floor() and jumps >= 1:
|
||||
jumps -= 1
|
||||
velocity.y = JUMP_VELOCITY
|
||||
if jumps == 0:
|
||||
$Jetpack/JumpIndicator.hide()
|
||||
|
||||
if Input.is_action_pressed("jump") and is_on_wall_only():
|
||||
print("WALL HANGING")
|
||||
@@ -79,6 +85,8 @@ func _process(delta: float) -> void:
|
||||
) * DASH_SPEED
|
||||
await get_tree().create_timer(DASH_LENGTH).timeout
|
||||
dashing = false
|
||||
if dashes == 0:
|
||||
$Jetpack/DashIndicator.hide()
|
||||
|
||||
elif direction and !dashing:
|
||||
velocity.x = direction * SPEED
|
||||
|
||||
Reference in new issue
Block a user