void GoCombat() { SoundPlay.PlayBackGroundSound("bgm_battle_loop", true, false); List <int> l = new List <int>(); List <int> lDefense = new List <int>(); List <SoldierInfo> soldierList = new List <SoldierInfo>(); foreach (var i in m_SelectedSoldier) { soldierList.Add(SoldierDC.GetSoldiers(i.Soldier.ID)); l.Add(i.Soldier.ID); lDefense.Add(i.Soldier.SoldierTypeID); } CmCarbon.SetAttackSoldier(soldierList); if (BattleEnvironmentM.GetBattleEnvironmentMode() == BattleEnvironmentMode.CombatPVE) { /*if (StageDC.GetPveMode() == PVEMode.Defense) { * StageDC.SendStageAttackRequest(StageDC.GetCompaignStageID(), lDefense, 0); * } else { * StageDC.SendStageAttackRequest(StageDC.GetCompaignStageID(), l, m_SelectedBlackScienceDataID); * } * DataCenter.RegisterHooks((int)gate.Command.CMD.CMD_702, CanCombat);*/ JoinCombat(); } else { JoinCombat(); } }
/// <summary> /// 资源卸载 /// </summary> public override void Clear() { SoundPlay.PlayBackGroundSound("bgm_city_loop", true, false); MapM.ClearMap(); CM.ExitCm(); ShipBombRule.ClearBombData(); WndManager.DestroyAllDialogs(); }
/// <summary> /// 构建世界空间 /// </summary> public override void BuildWorld() { Life.Environment = LifeEnvironment.View; SoundPlay.PlayBackGroundSound("bgm_city_loop", true, true); MainCameraM.s_Instance.ResetCameraDataByHaven(); MainCameraM.s_Instance.SetCameraLimitParam(MainCameraM.s_reaLimitPyramidHavenView); RevertFrCamPosTemp(false); MainCameraM.s_Instance.EnableDrag(true); }
void ClickCombat(UIButton sender) { CounterPartInfo Info = StageDC.GetCounterPartInfo(); if (Info == null) { return; } if (m_type != StageType.Normal) { int Times = StageDC.GetPassStageTimes(m_type, m_stageid); if (Times >= Info.times) { NGUIUtil.ShowTipWndByKey("88800031", 2); return; } } if (StageDC.GetPveMode() == PVEMode.Defense) { SoundPlay.PlayBackGroundSound("bgm_battle_loop", true, false); ShipCanvasInfo Canvas = new ShipCanvasInfo(); List <SoldierInfo> lSoldier = new List <SoldierInfo>(); List <ShipPutInfo> lBuild = new List <ShipPutInfo>(); ShipPlanDC.SetCurShipPlan(PlanType.Default); ShipPlan Plan = ShipPlanDC.GetCurShipPlan(); Plan.GetShipCansInfoPlan(ref Canvas, ref lSoldier, ref lBuild); CmCarbon.SetDefenseMap(Canvas); CmCarbon.SetDefenseBuild(lBuild); CmCarbon.SetDefenseSoldier(lSoldier); CmCarbon.SetDefenseFloor(UserDC.GetDeckLevel()); CmCarbon.SetDefenseUserInfo(Info, null); List <int> l = new List <int>(); foreach (SoldierInfo s in lSoldier) { l.Add(s.ID); } sender.enabled = false; //DataCenter.RegisterHooks((int)gate.Command.CMD.CMD_702, CanCombat); //StageDC.SendStageAttackRequest(m_stageid, l, 0); SceneM.Load(CombatScene.GetSceneName(), false, false); } else { sender.enabled = false; //SoldierDC.Send_SoldierBattleListRequest(0); //DataCenter.RegisterHooks((int)gate.Command.CMD.CMD_214, LoadStage); SceneM.Load(CombatScene.GetSceneName(), false, false); } }