public void SetPetFsmState( ePetFsmStateType _type) { SetPetFsmState( _type, null); }
public void SetPetFsmState( ePetFsmStateType _type, AsIMessage _msg) { if( m_CurrentFsmState != null) { if( m_CurrentFsmState.FsmStateType == _type) { Debug.LogWarning( "AsPetFsm::SetPetFsmState: 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); } }