Condition results are now cached so they are only evaluated once per frame, regardless of how many times they are being checked in the state machine logic.
Caching is made by each instance of the state machine and the condition respective scriptable object.
Added a boolean value to enable/disable this feature on each Condition Scriptable Object individually.
Extra internal changes:
The abstract function Condition.Statement() changed from public to protected so it can only be used inside the internal Condition.GetStatement().
Added documentation regarding all Get methods for the abstract Scriptable Objects to clarify their behaviors.
Removed StateTransitionSO since it was replaced by TransitionTableSO
Changed public TransitionTableSO.GetInitialState() to internal.
Changed a few SO references to their specialized classes.
* Update PigChef_TransitionTable.asset
Changes:
- From Idle
- To Sliding
- ~~IsActuallyMoving~~
- To JumpAscending
- ~~IsSliding~~
- From Walking
- **To Sliding (moved above To JumpAscending)**
- To JumpAscending
- ~~IsSliding~~
* Reordered Walking and Idle states transitions.
- To Sliding
- To JumpAscending
- To JumpDescending
- To Attack
- To PickUp
- To Talk
- To Walking/Idle
* Update PigChef.controller
Updated PigChef Animator controller to reflect the changes to the TransitionTable:
- Added transition from Walking to Collect on PickUp trigger.
- Added transition from Walking to Talking when IsTalking is True.
* Added MidSliding State
The MidSliding State is added to prevent the state machine from going back and forth between Sliding and JumpDescending when not needed.
* Major changes to player sliding and aerial movement, bug fixes, and adjustments...