Cleanup controller logic; tested more dot product stuff
This commit is contained in:
@@ -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,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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user