crabs-game/scripts/game1/ControlIndicators1.gd

14 lines
325 B
GDScript3
Raw Normal View History

2020-08-20 14:45:54 +02:00
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()