コード例 #1
0
ファイル: AsObjectFsm.cs プロジェクト: ftcaicai/ArkClient
 public void SetObjectFsmState(eObjectFsmStateType _type)
 {
     SetObjectFsmState(_type, null);
 }
コード例 #2
0
ファイル: AsObjectFsm.cs プロジェクト: ftcaicai/ArkClient
    public void SetObjectFsmState(eObjectFsmStateType _type, AsIMessage _msg)
    {
        if (m_CurrentFsmState != null)
        {
            m_CurrentFsmState.Exit();
            m_OldFsmState = m_CurrentFsmState;
        }
        //		else
        //			Debug.LogWarning("[AsBaseFsm]SetFsmState: current state");

        if (m_dicFsmState.ContainsKey(_type) == true)
        {
            state_ = _type;
            m_CurrentFsmState = m_dicFsmState[_type];
            m_CurrentFsmState.Enter(_msg);
        }
    }