public static float GetHeight(float x, float z) { BattleManager batmgr = CGameProcedure.s_BattleManager; if (batmgr == null) { return(0); } else { IBattle battle = batmgr.GetCurrentBattle(); if (battle == null) { return(0); } else { //UScene scene = battle.GetScene(); //if (scene == null) { return(0); } //else //{ // return scene.GetHeight(x, z); //} } } }
private void OnEnterBattle() { CGameProcedure.s_EventManager.OnPrepareOkEvent += OnLoadingBattleOk; SetStatus((int)BattleStatus.LoadingBattle); BattleType battleType = BattleType.TreasureBattle; IBattle battle = s_BattleManager.CreateBattle(battleType); s_BattleManager.EnterBattle(battle); }
public void LeaveBattle() { if (m_Battle != null) { m_Battle.Destroy(); m_Battle = null; CGameProcedure.SetActiveProc(CGameProcedure.s_ProcLobby); CGameProcedure.SetProcedureStatus((int)LobbyStatus.None); } }
public void EnterBattle(IBattle battle) { if (battle == null) { UnityEngine.Debug.LogError("battle == null"); return; } if (m_Battle == null) { m_Battle = battle; m_Battle.Init(); } }
public IBattle CreateBattle(BattleType _type) { IBattle battle = null; switch (_type) { case BattleType.TreasureBattle: { //battle = new TreasureBattle(); break; } default: break; } return(battle); }
private static void ClickMoveTo(Vector3 endpos) { bool closePathMoveTo = true; if (closePathMoveTo) { return; } IBattle battle = CGameProcedure.s_BattleManager.GetCurrentBattle(); if (battle != null) { //UScene scene = battle.GetScene(); //if (scene != null) //{ // Player my = CObjectManager.GetInstance().GetMySelf(); // if (my == null) // { // UnityEngine.Debug.LogError("my is null"); // return; // } // VInt3 start = my.GetPosition(); //List<VInt3> points = scene.FindPath(start, endpos); //if (points != null) //{ // IFsm state = my.GetFsmMgr().GetState(CharacterState.MovePath); // if (state != null && state.state == CharacterState.MovePath) // { // State_WalkPath wp = (State_WalkPath)state; // if (wp != null) // { // wp.SetPos(points); // my.GetFsmMgr().ChangeState(CharacterState.MovePath); // List<float> xlist = wp.GetPosX(); // List<float> zlist = wp.GetPosZ(); // BattleMessage.GetInstance().ReqMovePath(my.GetID(), xlist, zlist); // } // } //} //} } }