Beispiel #1
0
 /// <summary>
 /// 设置阵营战斗状态
 /// </summary>
 public void SetCampData(BattleCampInfo _info)
 {
     //Debug.Log("generalState :   " + _info.generalState + "      upGeneralStateCD : " + _info.upGeneralStateCD + "      downGeneralStateCD : " + _info.downGeneralStateCD);
     SetGeneralState(_info.generalState < 0);
     SetUpSoldiersState(_info.upGeneralStateCD);
     SetDownSoldiersState(_info.downGeneralStateCD);
 }
Beispiel #2
0
 /// <summary>
 /// 注销
 /// </summary>
 protected virtual void UnRegist()
 {
     MsgHander.UnRegist(0xC111, S2C_GetBattleSettlement);
     MsgHander.UnRegist(0xC109, S2C_UpdateBattleRank);
     MsgHander.UnRegist(0xC110, S2C_UpdateBattleInfo);
     MsgHander.UnRegist(0xC114, S2C_UpdateFightersInfo);
     MsgHander.UnRegist(0xC113, S2C_UpdateGoBackInfo);
     MsgHander.UnRegist(0xC115, S2C_GetBattleChannel);
     MsgHander.UnRegist(0xC149, S2C_GetBattleCountDown);
     settlementData = null;
     failyState     = null;
     demonState     = null;
     goBackCD       = 0;
     channel        = 0;
     CountDown      = 0;
     CampScore.Clear();
     rankListInfo.Clear();
 }
Beispiel #3
0
    /// <summary>
    /// 更新将的战斗状态
    /// </summary>
    private void S2C_UpdateFightersInfo(Pt _pt)
    {
        pt_update_general_state_c114 pt = _pt as pt_update_general_state_c114;

        if (pt != null)
        {
            if (failyState == null)
            {
                failyState = new BattleCampInfo(pt.fairyland_general);
                if (OnFightersUpdate != null)
                {
                    OnFightersUpdate(1);
                }
            }
            else
            {
                failyState.Update(pt.fairyland_general);
                if (OnFightersUpdate != null)
                {
                    OnFightersUpdate(1);
                }
            }
            if (demonState == null)
            {
                demonState = new BattleCampInfo(pt.demon_general);
                if (OnFightersUpdate != null)
                {
                    OnFightersUpdate(2);
                }
            }
            else
            {
                demonState.Update(pt.demon_general);
                if (OnFightersUpdate != null)
                {
                    OnFightersUpdate(2);
                }
            }
        }
    }