crabs-game/scripts/game1/ControlIndicators1.gd

14 lines
325 B
GDScript

extends Node2D
func _ready():
$ControlIndicatorLeft.show_press('left')
$ControlIndicatorRight.show_press('right')
func _input(event):
if !get_parent().get_node("Player").sleep:
if event.is_action_pressed('left'):
$ControlIndicatorLeft.hide()
if event.is_action_pressed('right'):
$ControlIndicatorRight.hide()