Esempio n. 1
0
 internal void Update()
 {
     if (CurState != null)
     {
         CurState.OnUpdate();
     }
 }
Esempio n. 2
0
        public void OnUpdate()
        {
            if (CurState == null)
            {
                return;
            }

            CurState.OnUpdate();
            if (CurState.IsFinished)
            {
                CurState.OnExit();
                CurState = DefState;
                CurState.OnEnter();
            }
            else if (_curEvent != null)
            {
                FSMState next = StateFromEvent(_curEvent);
                if (next == null)
                {
                    UnityEngine.Debug.Log(string.Format("fail to transfer next FSMState via event code {0}", _curEvent.EventCode));
                    _curEvent = null;
                    return;
                }

                CurState.OnExit();
                CurState = next;
                CurState.OnEnter(_curEvent);
                _curEvent = null;
            }
        }
Esempio n. 3
0
 //更新
 public void OnUpdate(float step)
 {
     if (CurState != null)
     {
         CurState.OnUpdate(step);
     }
 }
Esempio n. 4
0
 public void Update()
 {
     if (CurState != null)
     {
         CurState.OnUpdate();
     }
 }
Esempio n. 5
0
        public void Update()
        {
            if (CurState != null)
            {
                CurrentStateTime += Time.deltaTime;
                CurState.OnUpdate();
            }

            OnUpdate();
        }
Esempio n. 6
0
 public override void OnSyncedUpdate()
 {
     if (CurState != null)
     {
         CurState.OnUpdate();
     }
     mActorBuffManager.OnUpdate();
     AllTSTransform.OnUpdate();
     RotateTSTransform.OnUpdate();
 }