adde compound command calling for multi input control; added notes on dot product; testing stuff in skunk works folder
This commit is contained in:
+20
-18
@@ -1,46 +1,48 @@
|
||||
class_name CPU extends Node
|
||||
|
||||
|
||||
var command: Globals.ControllerCommand = Globals.ControllerCommand.NONE
|
||||
var throttle: Globals.ControllerCommand = Globals.ControllerCommand.NONE
|
||||
var commands: Globals.CompoundCommand = Globals.CompoundCommand.new()
|
||||
|
||||
|
||||
func process(_delta: float) -> Globals.ControllerCommand:
|
||||
return command
|
||||
func process(_delta: float) -> Globals.CompoundCommand:
|
||||
return commands
|
||||
|
||||
func physics_process(_delta: float) -> Globals.ControllerCommand:
|
||||
return command
|
||||
func physics_process(_delta: float) -> Globals.CompoundCommand:
|
||||
return commands
|
||||
|
||||
func unhandled_input(_event: InputEvent) -> Globals.ControllerCommand:
|
||||
return command
|
||||
func unhandled_input(_event: InputEvent) -> Globals.CompoundCommand:
|
||||
return commands
|
||||
|
||||
|
||||
func pitch_up() -> void:
|
||||
command = Globals.ControllerCommand.PITCH_UP
|
||||
commands.PITCH = Globals.ControllerCommand.PITCH_UP
|
||||
|
||||
func pitch_down() -> void:
|
||||
command = Globals.ControllerCommand.PITCH_DOWN
|
||||
commands.PITCH = Globals.ControllerCommand.PITCH_DOWN
|
||||
|
||||
func yaw_left() -> void:
|
||||
command = Globals.ControllerCommand.YAW_LEFT
|
||||
commands.YAW = Globals.ControllerCommand.YAW_LEFT
|
||||
|
||||
func yaw_right() -> void:
|
||||
command = Globals.ControllerCommand.YAW_RIGHT
|
||||
commands.YAW = Globals.ControllerCommand.YAW_RIGHT
|
||||
|
||||
func roll_left() -> void:
|
||||
command = Globals.ControllerCommand.ROLL_LEFT
|
||||
commands.ROLL = Globals.ControllerCommand.ROLL_LEFT
|
||||
|
||||
func roll_right() -> void:
|
||||
command = Globals.ControllerCommand.ROLL_RIGHT
|
||||
commands.ROLL = Globals.ControllerCommand.ROLL_RIGHT
|
||||
|
||||
func throttle_up() -> void:
|
||||
throttle = Globals.ControllerCommand.THROTTLE_UP
|
||||
commands.THROTTLE = Globals.ControllerCommand.THROTTLE_UP
|
||||
|
||||
func throttle_down() -> void:
|
||||
throttle = Globals.ControllerCommand.THROTTLE_DOWN
|
||||
commands.THROTTLE = Globals.ControllerCommand.THROTTLE_DOWN
|
||||
|
||||
func throttle_neutral() -> void:
|
||||
throttle = Globals.ControllerCommand.NONE
|
||||
commands.THROTTLE = Globals.ControllerCommand.NONE
|
||||
|
||||
func no_action() -> void:
|
||||
command = Globals.ControllerCommand.NONE
|
||||
commands.PITCH = Globals.ControllerCommand.NONE
|
||||
commands.YAW = Globals.ControllerCommand.NONE
|
||||
commands.ROLL = Globals.ControllerCommand.NONE
|
||||
commands.THROTTLE = Globals.ControllerCommand.NONE
|
||||
|
||||
Reference in New Issue
Block a user