// Use this for initialization void Start() { fsm = new FSMSystem(this); FSMState idle = fsm.AddState(State.Idle.ToString(), new IdleState()); FSMState rotating = fsm.AddState(State.Rotating.ToString(), new RotatingState()); idle.MarkNextState(rotating.ID); rotating.MarkNextState(idle.ID); fsm.ChangeState(State.Idle.ToString()); }
public void SetAnimationState(AnimationState.Animation state) { fsmSystem.ChangeState((int)state); }