public void SetCollectionFsmState( eCollectionFsmStateType _type, AsIMessage _msg) { if( m_CurrentFsmState != null) { if( m_CurrentFsmState.FsmStateType == _type) { Debug.LogWarning( "AsOtherUserFsm::SetOtherUserFsmState: same state = " + _type); return; } m_CurrentFsmState.Exit(); m_OldFsmState = m_CurrentFsmState; } if( m_dicFsmState.ContainsKey( _type) == true) { state_ = _type; m_CurrentFsmState = m_dicFsmState[_type]; m_CurrentFsmState.Enter( _msg); } }
// void OnDestroy() // { // AsUserInfo.Instance.dicBuff.Clear(); // } #endregion #region - fsm - public void SetPlayerFsmState( ePlayerFsmStateType _type, AsIMessage _msg) { // Debug.LogWarning( "SetPlayerFsmState: same state = " + _type + "old: " + m_OldFsmState + "cur : " + m_CurState); if( m_CurrentFsmState != null) { if( m_CurrentFsmState.FsmStateType == _type) { Debug.LogWarning( "AsPlayerFsm::SetPlayerFsmState: same state = " + _type); return; } m_CurrentFsmState.Exit(); m_OldFsmState = m_CurrentFsmState; } // else // Debug.LogWarning( "[AsBaseFsm]SetFsmState: current state"); if( m_dicFsmState.ContainsKey( _type) == true) { m_CurState = _type; m_CurrentFsmState = m_dicFsmState[_type]; m_CurrentFsmState.Enter( _msg); // switch( _type) // { // case ePlayerFsmStateType.IDLE: // StartCoroutine( "BeginIdleChecking"); // break; // } } else Debug.LogError( "[AsBaseFsm]SetFsmState: not registered state : [" + _type + "]"); }
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); } }
public void SetMonsterFsmState( eMonsterFsmStateType _type, AsIMessage _msg) { if( m_CurrentFsmState != null) { if( m_CurrentFsmState.FsmStateType == _type) { Debug.LogWarning( "AsMonsterFsm::SetMonsterFsmState: same state = " + _type); return; } m_CurrentFsmState.Exit(); ReleaseElements(); m_OldFsmState = m_CurrentFsmState; } if( m_dicFsmState.ContainsKey( _type) == true) { state_ = _type; m_CurrentFsmState = m_dicFsmState[_type]; m_CurrentFsmState.Enter( _msg); } }
public void SetNpcFsmState(eNpcFsmStateType _type, AsIMessage _msg) { if(m_CurrentFsmState != null) { m_CurrentFsmState.Exit(); m_OldFsmState = m_CurrentFsmState; } if(m_dicFsmState.ContainsKey(_type) == true) { state_ = _type; m_CurrentFsmState = m_dicFsmState[_type]; m_CurrentFsmState.Enter(_msg); } }