Input Snake
TaktycznyBocian
plain_text
3 years ago
345 B
37
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...