extends KinematicBody
const SPEED = 6

var velocity = Vector3(0,0,0)

onready var panel = get_node("../HUD")

func _physics_process(_delta):
#	if Input.is_action_pressed("game_right") and Input.is_action_pressed("game_left"):
#		velocity.x = 0
		
	if Input.is_action_pressed("game2_right"):
		velocity.x = SPEED
	elif Input.is_action_pressed("game2_left"):
		velocity.x = -SPEED
	else:
		velocity.x = 0
	
	#if Input.is_action_pressed("game_up") and Input.is_action_pressed("game_down"):
	#	velocity.z = 0
	
	if Input.is_action_pressed("game2_up"):
		velocity.z = -SPEED
	elif Input.is_action_pressed("game2_down"):
		velocity.z = SPEED
	else:
		velocity.z = 0
		
	if Input.is_action_just_pressed("ui_hide"):
		panel.visible = !panel.visible 
	move_and_slide(velocity)





