EntityStateComponent class
A component containing information about EntityState to used for the component.
Based on http://www.richardlord.net/blog/finite-state-machines-with-ash
class EntityStateComponent extends Component { int _currentState = null; int _previousState = null; Map<int, EntityState> _states; /// the name of the 'virtual' state (if != currentState, then it be after next /// [EntityStateSystem.process()] int state; /// the name of the current state. get currentState => _currentState; /// the name of the previous state (before last [EntityStateSystem.process()]) get previousState => _previousState; EntityStateComponent(this.state, Map<int, EntityState> this._states); }
Extends
Component > EntityStateComponent