コード例 #1
0
        public void SetCurrentState(FSMState <T> state)
        {
            if (m_CurrentState == state)
            {
                Log.w("FSM:Set Same State");
            }
            if (state == null)
            {
                return;
            }
            if (m_CurrentState != null)
            {
                m_CurrentState.Exit(m_Entity);
                m_PreviousState = m_CurrentState;
            }


            m_CurrentState = state;
            m_CurrentState.Enter(m_Entity);
            Log.i("StateChange:{0}->{1}", m_PreviousState, m_CurrentState);
        }