public static void SendGetPlanData() { ShipPlanDC.SetCurShipPlan(PlanType.Default); List <PlanType> l = new List <PlanType>(); l.Add(PlanType.Default); ShipPlanDC.SendCanvasBuildRequest(l); }
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); } }
public void SetStageid(StageType Type, int stageid) { m_stageid = stageid; m_type = Type; CounterPartInfo info = StageDC.GetCounterPartInfo(); StartCoroutine(DoBubble(info.m_lBubblePromt, 0.8f)); UpdateStageInfo(); ShowDropInfo(); ShowTitleByStageType(); UpdateSweepInfo(); if (StageDC.GetPveMode() == PVEMode.Defense) { ShipPlanDC.SetCurShipPlan(PlanType.Default); ShipPlan Plan = ShipPlanDC.GetCurShipPlan(); if (MyHead.RoleText != null) { MyHead.RoleText.text = "[ffff00]" + NGUIUtil.GetStringByKey("88800094") + "[-]"; } if (MyHead.PlanText != null) { if (Plan != null) { MyHead.PlanText.text = "[ffff00]" + NGUIUtil.GetStringByKey("88800095") + "[-][ffffff]" + Plan.Name + "[-]"; } else { MyHead.PlanText.text = "[ffff00]" + NGUIUtil.GetStringByKey("88800095") + "[-]"; } } SetStageSoldier(); MyHead.DefenseBg.gameObject.SetActive(true); } else { if (MyHead.Role != null) { MyHead.Role.SetActive(false); } if (MyHead.Plan != null) { MyHead.Plan.SetActive(false); } } }