public override void Enter(AsIMessage _msg) { m_OwnerFsm.Entity.SetProperty(eComponentProperty.COMBAT, true); // float time = AsTableManager.Instance.GetTbl_GlobalWeight_Record("InputwaitTime").Value; float time = AsTableManager.Instance.GetTbl_GlobalWeight_Record(31).Value * 0.001f; SetTimer(time); m_OwnerFsm.time_ = time; }
public void SetCombatState(eCombatStateType _type, AsIMessage _msg) { // if(m_CombatState.FsmStateType != _type) // { combat_ = _type; m_CombatState.Exit(); m_CombatState = m_dicCombatState[_type]; m_CombatState.Enter(_msg); // } }
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 OnRecoverState( AsIMessage _msg) { SetPlayerFsmState( ePlayerFsmStateType.IDLE); }
IEnumerator SceneLoadingComplete_CR( AsIMessage _msg) { while(true) { if(AsGameMain.s_gameState == GAME_STATE.STATE_INGAME) break; yield return null; } // if( AsGameMain.s_gameState != GAME_STATE.STATE_INGAME && // AsGameMain.s_gameState != GAME_STATE.STATE_LOADING) // { // Debug.Log( "AsPlayerFsm::OnModelLoaded: AsGameMain.s_gameState == " + AsGameMain.s_gameState); // return; // } float hp = m_Entity.GetProperty<float>( eComponentProperty.HP_CUR); bool living = m_Entity.GetProperty<bool>( eComponentProperty.LIVING); //debug Debug.Log( "AsPlayerFsm::OnModelLoaded: hp = " + hp); Debug.Log( "AsPlayerFsm::OnModelLoaded: living = " + living); if( hp < 1 || living == false) { if( TerrainMgr.Instance.IsCurMapType( eMAP_TYPE.Pvp) == false) { Debug.Log( "AsPlayerFsm::OnModelLoaded: AsGameMain.s_gameState == " + AsGameMain.s_gameState); AsNotify.Instance.DeathDlg(); } if( m_CurrentFsmState == null || m_CurrentFsmState.FsmStateType != ePlayerFsmStateType.DEATH) SetPlayerFsmState( ePlayerFsmStateType.DEATH, new Msg_EnterWorld_Death( true)); else m_CurrentFsmState.MessageProcess( new Msg_EnterWorld_Death( true)); } else { if( m_CurrentFsmState != null) m_CurrentFsmState.MessageProcess( _msg); } }
void OnNpcClick( AsIMessage _msg) { if( ( null != AsHudDlgMgr.Instance) && ( true == AsHudDlgMgr.Instance.IsDontMoveState)) return; m_CurrentFsmState.MessageProcess( _msg); }
void FishLoadModelDummy( AsIMessage _msg) { if ( m_CollectionEntity.FsmType != eFsmType.COLLECTION) return; AsNpcEntity npcEntity = ( AsNpcEntity)m_Entity; Tbl_Collection_Record record = AsTableManager.Instance.getColletionTable.GetRecord( npcEntity.TableIdx); if ( record != null && record.technic == eCOLLECTION_TECHNIC.QUEST) { //check npcEntity.collectionMark = m_Entity.gameObject.AddComponent<QuestCollectionMarkController>(); npcEntity.collectionMark.Init( npcEntity.TableIdx, npcEntity.namePanel, (AsBaseEntity)npcEntity); npcEntity.collectionMark.UpdateQuestCollectionMark(); } }
void OnZoneWarpEnd( AsIMessage _msg) { topInfo = new SavedMoveInfo( eMoveType.Sync_Stop, transform.position, transform.position); secondInfo = new SavedMoveInfo( eMoveType.Sync_Stop, transform.position, transform.position); sendedInfo = new SavedMoveInfo( eMoveType.Sync_Stop, transform.position, transform.position); }
void OnInputAttack( AsIMessage _msg) { if( ( null != AsHudDlgMgr.Instance) && ( true == AsHudDlgMgr.Instance.IsDontMoveState) || AsInputManager.Instance.m_Activate == false) // if( null != AsHudDlgMgr.Instance && ( true == AsHudDlgMgr.Instance.IsOpenTrade || true == AsHudDlgMgr.Instance.IsOpenEnchantDlg || true == AsHudDlgMgr.Instance.IsOpenStrengthenDlg)) return; if( CheckMap_Village() == true) { // string content = AsTableManager.Instance.GetTbl_String(830); // AsChatManager.Instance.InsertChat( content, eCHATTYPE.eCHATTYPE_SYSTEM, true); AsMyProperty.Instance.AlertSkillInTown(); return; } if( WeaponEquip == true) m_CurrentFsmState.MessageProcess( _msg); else AsMyProperty.Instance.AlertNoWeapon(); }
void OnEmotionSeatIndicate( AsIMessage _msg) { m_CurrentFsmState.MessageProcess( _msg); }
void OnChoice( AsIMessage _msg) { SetPlayerFsmState( ePlayerFsmStateType.CHOICE); }
void OnProduct( AsIMessage _msg) { SetPlayerFsmState( ePlayerFsmStateType.PRODUCT); //m_CurrentFsmState.MessageProcess( _msg); }
void OnEmotionIndicate( AsIMessage _msg) { m_CurrentFsmState.MessageProcess( _msg); // if( Entity.GetProperty<bool>( eComponentProperty.COMBAT) == true) // return; // // Msg_EmotionIndicate emotion = _msg as Msg_EmotionIndicate; // eCLASS __class = Entity.GetProperty<eCLASS>( eComponentProperty.CLASS); // eGENDER gender = Entity.GetProperty<eGENDER>( eComponentProperty.GENDER); // // int action = -1; // // switch( __class) // { // case eCLASS.DIVINEKNIGHT: // if( gender == eGENDER.eGENDER_MALE) // action = emotion.record_.DivineKnightAction_Male; // else if( gender == eGENDER.eGENDER_FEMALE) // action = emotion.record_.DivineKnightAction_Female; // break; // case eCLASS.CLERIC: // if( gender == eGENDER.eGENDER_MALE) // action = emotion.record_.ClericAction_Male; // else if( gender == eGENDER.eGENDER_FEMALE) // action = emotion.record_.ClericAction_Female; // break; // case eCLASS.MAGICIAN: // if( gender == eGENDER.eGENDER_MALE) // action = emotion.record_.MagicianAction_Male; // else if( gender == eGENDER.eGENDER_FEMALE) // action = emotion.record_.MagicianAction_Female; // break; // } }
void OnClosePrivateShop( AsIMessage _msg) { m_CurrentFsmState.MessageProcess( _msg); }
void OnOpenPrivateShop( AsIMessage _msg) { SetPlayerFsmState( ePlayerFsmStateType.PRIVATESHOP, _msg); }
void OnDeath( AsIMessage _msg) { StartCoroutine( DeathProcess( _msg)); }
void OnModelLoaded_Dummy( AsIMessage _msg) { if( m_CurrentFsmState != null) m_CurrentFsmState.MessageProcess( _msg); }
void OnBalloonIndicate( AsIMessage _msg) { Msg_BalloonIndicate balloon = _msg as Msg_BalloonIndicate; string str = AsTableManager.Instance.GetTbl_String( (int)balloon.potency_.Potency_IntValue); AsChatManager.Instance.ShowChatBalloon( m_UserEntity.UniqueId, str, eCHATTYPE.eCHATTYPE_PUBLIC); }
void OnLevelUp( AsIMessage _msg) { m_LevelUp = _msg as Msg_Level_Up; LevelUpExecution(); BonusManager.Instance.PlayerLevelUp(m_LevelUp); // AsHudDlgMgr.Instance.PlayerLevelUp(); }
void OnAutoCombatOn( AsIMessage _msg) { StartCoroutine("AutoCombatTargetSearch"); }
// bool m_ZoneWarping = false; void OnZoneWarp( AsIMessage _msg) { StopCoroutine( "RefreshDelay"); }
void OnAutoCombatOff( AsIMessage _msg) { Msg_AutoCombat_Off off = _msg as Msg_AutoCombat_Off; if(off.release_ == true) Target = null; StopCoroutine("AutoCombatTargetSearch"); }
//MOVE #region - input - void OnInputMove( AsIMessage _msg) { if( CheckSpecificWindowOpened() == true) return; if( true == AsUserInfo.Instance.isProductionProgress) { string strTitle = AsTableManager.Instance.GetTbl_String(126); string strText = AsTableManager.Instance.GetTbl_String(268); if( true != AsHudDlgMgr.Instance.isOpenMsgBox) { AsHudDlgMgr.Instance.SetMsgBox( AsNotify.Instance.MessageBox( strTitle, strText, this, "SendProductProgressCancel", AsNotify.MSG_BOX_TYPE.MBT_OKCANCEL, AsNotify.MSG_BOX_ICON.MBI_QUESTION)); } AsInputManager.Instance.BlockHoldMove(); return; } if( ( null != AsHudDlgMgr.Instance) && ( true == AsHudDlgMgr.Instance.IsDontMoveState) || AsInputManager.Instance.m_Activate == false) // if( null != AsHudDlgMgr.Instance && ( true == AsHudDlgMgr.Instance.IsOpenTrade || true == AsHudDlgMgr.Instance.IsOpenEnchantDlg || true == AsHudDlgMgr.Instance.IsOpenStrengthenDlg)) return; m_CurrentFsmState.MessageProcess( _msg); }
void OnRubMove( AsIMessage _msg) { m_CurrentFsmState.MessageProcess( _msg); }
void OnMoveEndInform( AsIMessage _msg) { m_CurrentFsmState.MessageProcess( _msg); }
void OnOtherUserClick( AsIMessage _msg) { if( ( null != AsHudDlgMgr.Instance) && ( true == AsHudDlgMgr.Instance.IsDontMoveState)) // if( null != AsHudDlgMgr.Instance && ( true == AsHudDlgMgr.Instance.IsOpenTrade || true == AsHudDlgMgr.Instance.IsOpenEnchantDlg || true == AsHudDlgMgr.Instance.IsOpenStrengthenDlg)) return; Msg_OtherUserClick otherUserClick = _msg as Msg_OtherUserClick; // AsHUDController.Instance.SetTargetUser( ( ushort)( otherUserClick.idx_)); // List<AsUserEntity> entity = AsEntityManager.Instance.GetUserEntityBySessionId( ( ushort)( otherUserClick.idx_)); // if( null == entity) // return; // Target = entity[0]; Debug.Log( "AsPlayerFsm:: OnOtherUserClick: otherUserClick.idx_ " + otherUserClick.idx_); AsUserEntity entity = AsEntityManager.Instance.GetUserEntityByUniqueId( otherUserClick.idx_); Debug.Log( "AsPlayerFsm:: OnOtherUserClick: entity = " + entity); if( TargetDecider.CheckOtherUserIsEnemy( entity) == false) Target = entity; // if( entity.GetProperty<bool>( eComponentProperty.SHOP_OPENING) == true) // { m_CurrentFsmState.MessageProcess( _msg); // } }
void OnCollectInfo( AsIMessage _msg) { m_CurrentFsmState.MessageProcess( _msg); }
// msg ------------------------------------------------------------------------------- ////////////////////////////////////////////////////////////////////////////////////// //BASIC// #region - model loaded - void OnModelLoaded( AsIMessage _msg) { m_ElementProcessor.ModelLoaded(); m_ElementProcessor.PlayerModelLoaded(); PlayAction_Idle(); StartCoroutine(SceneLoadingComplete_CR( _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 + "]"); }
void OnNpcClick( AsIMessage _msg) { if( ( null != AsHudDlgMgr.Instance) && ( true == AsHudDlgMgr.Instance.IsDontMoveState)) // if( null != AsHudDlgMgr.Instance && ( true == AsHudDlgMgr.Instance.IsOpenTrade || true == AsHudDlgMgr.Instance.IsOpenEnchantDlg || true == AsHudDlgMgr.Instance.IsOpenStrengthenDlg)) return; m_CurrentFsmState.MessageProcess( _msg); }