Esempio n. 1
0
    public void OnStateChange(SailorStateController.m_sailorStates _newState)                                                   //水手状态改变时调用
    {
        if (_newState == m_sailorCurrState)
        {
            return;
        }
        if (!CheckForValidState(_newState))
        {
            return;
        }
        switch (_newState)
        {
        case SailorStateController.m_sailorStates.idle:
            m_sailorAnimator.SetBool("sailorDia", false);
            break;

        case SailorStateController.m_sailorStates.dialog:
            m_sailorAnimator.SetBool("sailorDia", true);
            break;
        }
        m_sailorCurrState = _newState;
    }
Esempio n. 2
0
    bool CheckForValidState(SailorStateController.m_sailorStates newState)
    {
        bool _returnVal = true;                                                                                                                                                 //默认不可转

        return(_returnVal);
    }