Input Snake
TaktycznyBocian
plain_text
02/16/2023 6:05 PM
460 B
45
Indexable
func _input(event) :
if Input.is_action_just_pressed("ui_right") :
snake_direction = Vector2(1,0)
if Input.is_action_just_pressed("ui_left") :
snake_direction = Vector2(-1,0)
if Input.is_action_just_pressed("ui_down") :
snake_direction = Vector2(0,1)
if Input.is_action_just_pressed("ui_up") :
snake_direction = Vector2(0,-1)Editor is loading...