29 lines
719 B
GDScript
29 lines
719 B
GDScript
class_name Player extends Node
|
|
|
|
|
|
func process(_delta: float) -> String:
|
|
if Input.is_action_pressed("pull_up"):
|
|
return "pull_up"
|
|
if Input.is_action_pressed("push_down"):
|
|
return "push_down"
|
|
if Input.is_action_pressed("yaw_left"):
|
|
return "yaw_left"
|
|
if Input.is_action_pressed("yaw_right"):
|
|
return "yaw_right"
|
|
if Input.is_action_pressed("roll_left"):
|
|
return "roll_left"
|
|
if Input.is_action_pressed("roll_right"):
|
|
return "roll_right"
|
|
if Input.is_action_pressed("throttle_up"):
|
|
return "throttle_up"
|
|
if Input.is_action_pressed("throttle_down"):
|
|
return "throttle_down"
|
|
|
|
return ""
|
|
|
|
func physics_process(_delta: float) -> String:
|
|
return ""
|
|
|
|
func unhandled_input(_event: InputEvent) -> String:
|
|
return ""
|