2026-10-18 14:56:21 -05:00
|
|
|
class_name CPU extends Node
|
|
|
|
|
|
|
|
|
|
|
2026-10-25 19:45:31 -05:00
|
|
|
var command: Globals.ControllerCommand = Globals.ControllerCommand.NONE
|
|
|
|
|
var throttle: Globals.ControllerCommand = Globals.ControllerCommand.NONE
|
2026-10-25 16:22:34 -05:00
|
|
|
|
|
|
|
|
|
2026-10-20 21:38:30 -05:00
|
|
|
func process(_delta: float) -> Globals.ControllerCommand:
|
2026-10-25 16:22:34 -05:00
|
|
|
return command
|
2026-10-18 14:56:21 -05:00
|
|
|
|
2026-10-20 21:38:30 -05:00
|
|
|
func physics_process(_delta: float) -> Globals.ControllerCommand:
|
2026-10-25 16:22:34 -05:00
|
|
|
return command
|
2026-10-18 14:56:21 -05:00
|
|
|
|
2026-10-20 21:38:30 -05:00
|
|
|
func unhandled_input(_event: InputEvent) -> Globals.ControllerCommand:
|
2026-10-25 16:22:34 -05:00
|
|
|
return command
|
|
|
|
|
|
2026-10-25 19:45:31 -05:00
|
|
|
|
2026-10-25 16:22:34 -05:00
|
|
|
func pull_up() -> void:
|
|
|
|
|
command = Globals.ControllerCommand.PULL_UP
|
|
|
|
|
|
|
|
|
|
func push_down() -> void:
|
|
|
|
|
command = Globals.ControllerCommand.PUSH_DOWN
|
|
|
|
|
|
|
|
|
|
func yaw_left() -> void:
|
|
|
|
|
command = Globals.ControllerCommand.YAW_LEFT
|
|
|
|
|
|
|
|
|
|
func yaw_right() -> void:
|
|
|
|
|
command = Globals.ControllerCommand.YAW_RIGHT
|
|
|
|
|
|
|
|
|
|
func roll_left() -> void:
|
|
|
|
|
command = Globals.ControllerCommand.ROLL_LEFT
|
|
|
|
|
|
|
|
|
|
func roll_right() -> void:
|
|
|
|
|
command = Globals.ControllerCommand.ROLL_RIGHT
|
|
|
|
|
|
|
|
|
|
func throttle_up() -> void:
|
2026-10-25 19:45:31 -05:00
|
|
|
throttle = Globals.ControllerCommand.THROTTLE_UP
|
2026-10-25 16:22:34 -05:00
|
|
|
|
|
|
|
|
func throttle_down() -> void:
|
2026-10-25 19:45:31 -05:00
|
|
|
throttle = Globals.ControllerCommand.THROTTLE_DOWN
|
|
|
|
|
|
|
|
|
|
func throttle_neutral() -> void:
|
|
|
|
|
throttle = Globals.ControllerCommand.NONE
|
|
|
|
|
|
|
|
|
|
func no_action() -> void:
|
|
|
|
|
command = Globals.ControllerCommand.NONE
|