Пример #1
0
        public void StartUpFsmController()
        {
            if (TopStateMachine == null)
            {
                Debug.LogError("FSMController Cant Start ,TopStateMachine is Null");
                return;
            }
            if (TopStateMachine.DefaultState == null)
            {
                Debug.LogError("FSMController Cant Start ,TopStateMachine  DefaultState is Null");
                return;
            }

            CurStateMachine = TopStateMachine;
            CurState        = TopStateMachine.DefaultState;

            TopStateMachine.OnEnterStateMachine();
        }
 /// <summary>
 /// Handles exceptions caught while executing exit actions.
 /// </summary>
 /// <param name="context">Additional contextual information.</param>
 private void handleExitActionException(NSFExceptionContext context)
 {
     TopStateMachine.handleException(new Exception(Name + " state exit action exception", context.Exception));
 }