Cleanup controller logic; tested more dot product stuff

This commit is contained in:
2026-11-06 18:00:33 -06:00
parent 6308ccb4fa
commit 324a01c165
8 changed files with 42 additions and 77 deletions
-16
View File
@@ -18,19 +18,3 @@ func process(delta: float) -> Globals.CompoundCommand:
return player.process(delta)
_:
return Globals.CompoundCommand.new()
func physics_process(delta: float) -> Globals.CompoundCommand:
if Globals.ControlMode.CPU_MODE == control_mode:
return cpu.physics_process(delta)
elif Globals.ControlMode.PLAYER_MODE == control_mode:
return player.physics_process(delta)
return Globals.CompoundCommand.new()
func unhandled_input(event: InputEvent) -> Globals.CompoundCommand:
if Globals.ControlMode.CPU_MODE == control_mode:
return cpu.unhandled_input(event)
elif Globals.ControlMode.PLAYER_MODE == control_mode:
return player.unhandled_input(event)
return Globals.CompoundCommand.new()
-7
View File
@@ -7,13 +7,6 @@ var commands: Globals.CompoundCommand = Globals.CompoundCommand.new()
func process(_delta: float) -> Globals.CompoundCommand:
return commands
func physics_process(_delta: float) -> Globals.CompoundCommand:
return commands
func unhandled_input(_event: InputEvent) -> Globals.CompoundCommand:
return commands
func pitch_up() -> void:
commands.PITCH = Globals.ControllerCommand.PITCH_UP
-6
View File
@@ -29,12 +29,6 @@ func process(_delta: float) -> Globals.CompoundCommand:
return commands
func physics_process(_delta: float) -> Globals.CompoundCommand:
return Globals.CompoundCommand.new()
func unhandled_input(_event: InputEvent) -> Globals.CompoundCommand:
return Globals.CompoundCommand.new()
func no_action() -> void:
commands.PITCH = Globals.ControllerCommand.NONE
commands.YAW = Globals.ControllerCommand.NONE