21 lines
651 B
GDScript
21 lines
651 B
GDScript
extends Node
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready():
|
|
pass
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(_delta):
|
|
if Input.is_action_just_pressed("ui_up"):
|
|
$GemGrid.up()
|
|
elif Input.is_action_just_pressed("ui_down"):
|
|
$GemGrid.down()
|
|
elif Input.is_action_just_pressed("ui_left"):
|
|
$GemGrid.left()
|
|
elif Input.is_action_just_pressed("ui_right"):
|
|
$GemGrid.right()
|
|
elif Input.is_action_just_pressed("ui_accept"):
|
|
$GemGrid.select()
|
|
elif Input.is_action_just_pressed("ui_cancel"):
|
|
$GemGrid.cancel()
|