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