add input function
This commit is contained in:
parent
0fe5cca646
commit
53780532bf
|
@ -36,4 +36,14 @@ func _ready() -> void:
|
||||||
add_child(piece)
|
add_child(piece)
|
||||||
pieces_row.append(piece)
|
pieces_row.append(piece)
|
||||||
|
|
||||||
pieces.append(pieces_row)
|
pieces.append(pieces_row)
|
||||||
|
|
||||||
|
func _input(event):
|
||||||
|
if event.is_action_pressed("ui_up"):
|
||||||
|
print("up")
|
||||||
|
if event.is_action_pressed("ui_down"):
|
||||||
|
print("down")
|
||||||
|
if event.is_action_pressed("ui_left"):
|
||||||
|
print("left")
|
||||||
|
if event.is_action_pressed("ui_right"):
|
||||||
|
print("right")
|
||||||
|
|
Loading…
Reference in a new issue