diff --git a/art/idle_gem.gif b/art/idle_gem.gif new file mode 100644 index 0000000..bd588ae Binary files /dev/null and b/art/idle_gem.gif differ diff --git a/player_2d.gd b/player_2d.gd index eba2422..1804ace 100644 --- a/player_2d.gd +++ b/player_2d.gd @@ -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