예제 #1
0
    /// <summary>
    ///  This method decides if the state should transition to another
    /// </summary>
    /// <returns></returns>
    public virtual bool OnCheckTransition()
    {
        bool isTransition = false;

        for (int i = 0; i < m_FSMTransitionList.Count; i++)
        {
            FSMTransition fsmTransition = m_FSMTransitionList[i];

            if (fsmTransition.CheckTransitionList() == true)
            {
                //Get the next state which the Finite State Machine will switch to
                this.m_ToNextFSMState = fsmTransition.GetNextFSMState();

                isTransition = true;

                break;
            }
        }

        return(isTransition);
    }