Refactored to be controller centric; added message buss pattern with early support eent types
This commit is contained in:
@@ -15,12 +15,13 @@ const PLAYER_MODE: int = 1
|
||||
|
||||
|
||||
func process(delta: float) -> Globals.ControllerCommand:
|
||||
if CPU_MODE == control_mode:
|
||||
return cpu.process(delta)
|
||||
elif PLAYER_MODE == control_mode:
|
||||
return player.process(delta)
|
||||
|
||||
return Globals.ControllerCommand.NONE
|
||||
match control_mode:
|
||||
CPU_MODE:
|
||||
return cpu.process(delta)
|
||||
PLAYER_MODE:
|
||||
return player.process(delta)
|
||||
_:
|
||||
return Globals.ControllerCommand.NONE
|
||||
|
||||
func physics_process(delta: float) -> Globals.ControllerCommand:
|
||||
if CPU_MODE == control_mode:
|
||||
|
||||
Reference in New Issue
Block a user