-
Notifications
You must be signed in to change notification settings - Fork 1
Description
There may be case, when logic should disable ability to run or jump (i.e. when character is hungry or weak). This can be achieved by introducing a dedicated properties in Walking, i.e. enable_run and enable_jump.
But the logic of running/jumping can be decoupled to a separate Running and Jumping abilities. That would give a possibility to implement own logic, more complex bobbing, adding other types of movements, and finally disabling behaviors easily in controller's top-level logic.
To do this, probably Walking ability must be decoupled to a base Movement ability, then the rest can be implemented as Walk-Run-Jump single component, or as a separate behaviors (one component per ability, i.e. Run, Jump, Walk). The Movement ability can be used as a state manager to handle mutually exclusive movements (may be related to #5)
The Movement ability, implemented to handle mutually exclusive types of movements, will solve #5 in terms of movement, and will handle most common controllers. For unusual player controllers a custom movement ability have to be implemented. I think it's a good enough compromise.