void JoinCombat() { MainCameraM.s_Instance.EnableDrag(true); WndManager.DestoryDialog <SelectSoldierwnd>(); CombatInfoWnd wndInfo = WndManager.GetDialog <CombatInfoWnd>(); if (wndInfo != null) { wndInfo.SetWndMode(CombatInfoMode.combat); } CombatWnd wnd = WndManager.GetDialog <CombatWnd>(); if (wnd != null) { wnd.InitSoldierUI(); } if (m_SelectedBlackScienceCaptainID != 0) //黑科技设置 { CmCarbon.AddGodSkill(true, m_SelectedBlackScienceCaptainID, ConfigM.GetInitMana()); GodSkillWnd gsw = WndManager.GetDialog <GodSkillWnd>(); if (gsw != null) { gsw.SetCurMana(CmCarbon.GetGodSkillMana(true)); gsw.SetRequireMana(CmCarbon.GetGodSkill(true).GetRequireMana()); } } CombatScheduler.SetCSState(CSState.Combat); }
void BtnClose_OnClickEventHandler(UIButton sender) { WndManager.DestoryDialog <ClickSkillDescWnd>(); //关闭动画会有卡顿感觉,和UE沟通后改成直接关闭 //WndEffects.DoCloseWndEffect(gameObject,DestoryDialogCallBack); DestoryDialogCallBack(null); }
private void EquipComposeResponse(int nErrorCode) { if (nErrorCode == 0) { NGUIUtil.ShowTipWndByKey(30000036); RefreshEquipItems(); PdbycWnd wnd1 = WndManager.FindDialog <PdbycWnd>(); if (wnd1) { wnd1.RefreshEquipItems(); } EquipmentInfoWnd wnd2 = WndManager.FindDialog <EquipmentInfoWnd>(); if (wnd2) { wnd2.RefreshUI(); } WndManager.DestoryDialog <EquipComposeWnd>(); } EquipmentInfoWnd wnd = WndManager.FindDialog <EquipmentInfoWnd>(); if (wnd) { wnd.CheckEquipExist(); wnd.TweenReset(); } }
public static void DestoryDialogCallBack(object g) { WndManager.DestoryDialog <BeiBaoWnd>(); WndManager.DestoryDialog <ItemInfoWnd>(); // WndManager.ShowAllWnds(true); MainCameraM.s_Instance.EnableDrag(true); }
void BtnClose_OnClickEventHandler(UIButton sender) { WndManager.DestoryDialog <SoldierInfoWnd>(); WndManager.DestoryDialog <HeroIntroduceWnd>(); WndManager.DestoryDialog <AddSkillWnd>(); WndManager.DestoryDialog <SoldierScrollWnd>(); }
void BtnOK_OnClickEventHandler(UIButton sender) { if (m_iWndType == 3) { PdbbbWnd wnd = WndManager.FindDialog <PdbbbWnd>(); if (wnd) { wnd.RefreshUI(); } } else if (m_iWndType == 5) { if (BtnOKClickHandler != null) { BtnOKClickHandler(); } WndManager.DestoryDialog <TrophiesActionWnd>(); return; } if (mItemInfos.Count == 0) { WndManager.DestoryDialog <TrophiesActionWnd>(); if (FinalEventClikHandler != null) { FinalEventClikHandler(null); } } else { ResetAni(); GetTropies(0, null); } }
void Resweep(UIButton sender) { ItemTypeInfo sweepTicketInfo = ItemDC.GetSweepTickets(); if (sweepTicketInfo == null || sweepTicketInfo.Num < mSweepCount) { WndManager.DestoryDialog <StageWipeWnd>(); NGUIUtil.ShowFreeSizeTipWnd(NGUIUtil.GetStringByKey("70000229")); return; } CounterPartInfo info = StageDC.GetCounterPartInfo(); int playerPhysical = UserDC.GetPhysical(); // ÌåÁ¦²»×ã if (playerPhysical < info.win_physical * mSweepCount) { WndManager.DestoryDialog <StageWipeWnd>(); NGUIUtil.ShowFreeSizeTipWnd(NGUIUtil.GetStringByKey("99904008")); return; } StageDC.SendStageSweepRequest(StageDC.GetCompaignStageID(), mSweepCount); Clear(); //DataCenter.RegisterHooks((int)gate.Command.CMD.CMD_718, ShowSweepResult); }
void ClickUp() { if (m_wnd) { WndManager.DestoryDialog <StageTipWnd>(); } }
void BtnRebattle_OnClickEventHandler(UIButton sender) { Time.timeScale = 1f; WndManager.DestoryDialog <CombatSchedulerWnd>(); BSC.AntiAllRegisterHooks(); SceneM.Load(ViewStageScene.GetSceneName(), false, null, false); }
void CloseCallBack(object o) { UIPanel panel = GetComponent <UIPanel>(); Debug.Log("CaptionUpgradeWnd " + panel.startingRenderQueue); WndManager.DestoryDialog <CaptionUpgradeWnd>(); }
void ClearUI() { WndManager.DestoryDialog <AddSkillWnd>(); if (MyHead.EquipmentsParent) { U3DUtil.DestroyAllChild(MyHead.EquipmentsParent); } }
void BtnExit_OnClickEventHandler(UIButton sender) { Time.timeScale = 1f; StageDC.SendStageSettleRequest(StageDC.GetCompaignStageID(), null, null, true, false); WndManager.DestoryDialog <CombatSchedulerWnd>(); BSC.AntiAllRegisterHooks(); SceneM.Load(MainTownScene.GetSceneName(), false, null, false); }
/// <summary> /// 902 升级 /// </summary> /// <param name="nErrorCode"></param> void TrapLevelUp_Resp(int nErrorCode) { if (nErrorCode == 0) { WndManager.DestoryDialog <TrapUplevWnd>(); m_parentwnd.UpLevelEffect(); } }
void BtnConfirm_OnClickEventHandler(UIButton sender) { if (CallBackFun != null) { CallBackFun(); } WndManager.DestoryDialog <TradeConfirmWnd>(); }
void BtnOK_OnClickEventHandler(UIButton sender) { if (OKButtonOnClick != null) { WndManager.DestoryDialog <SaveFangAnWnd>(); OKButtonOnClick(sender); } }
void BtnSure_OnClickEventHandler(UIButton sender) { switch (m_wndType) { case 1: //确定 BtnWndBg_OnClickEventHandler(null); break; case 2: //合成公式 TweenLeft(); EquipComposeWnd wnd = WndManager.GetDialog <EquipComposeWnd>(); if (wnd) { EnableBtn(false); wnd.SetData(m_iItemTypeID); } break; case 3: //穿装备 PdbycWnd wnd1 = WndManager.FindDialog <PdbycWnd>(); if (wnd1) { wnd1.SetEquipDataNoReady(); } MyHead.BtnSure.isEnabled = false; SoldierDC.Send_SoldierEquipRequest(m_soldierInfo.ID, m_posIndex); WndManager.DestoryDialog <EquipmentInfoWnd>(); break; case 4: //购买 //堆叠数量上限判定 bool overLimit = ItemDC.CheckItemOverLimit(m_iItemTypeID, m_iBuyCount); if (overLimit) { NGUIUtil.ShowTipWndByKey(30000030); break; } //持有代币是否足够 bool currencyEnough = UserDC.CheckCurrencyEnough(m_iBuyCurrency, m_iBuyPrice); if (currencyEnough) { } else { string currencyName = NGUIUtil.GetStringByKey(99700000 + m_iBuyCurrency); string tipText = string.Format(NGUIUtil.GetStringByKey(30000029), currencyName); //NGUIUtil.ShowTipWnd(tipText); NGUIUtil.ShowFreeSizeTipWnd(tipText); } break; case 5: //获得途径 ItemComeFromWnd Formwnd = WndManager.GetDialog <ItemComeFromWnd>(); s_itemtypeInfo info = ItemM.GetItemInfo(m_iItemTypeID); Formwnd.SetData(info, m_soldierInfo, null); break; } }
/// <summary> /// 切换到上一个炮弹兵 /// </summary> void BtnSoldierPrev_OnClickEventHandler(UIButton sender) { WndManager.DestoryDialog <ClickSkillDescWnd>(); SoldierInfo info1 = m_allExistSoldier.PrevOf <SoldierInfo>(m_soldierInfo); SetData(info1); m_preSoldierInfo.Copy(info1); }
/// <summary> /// 更新玩家信息 /// </summary> private void BuildAnnalyze(int nErrorCode) { if (nErrorCode == 0) { //弹出拆解结果 WndManager.DestoryDialog <TrapShowWnd>(); WndManager.DestoryDialog <TrapSplitWnd>(); } }
/// <summary> /// 图鉴(资源未出) /// </summary> public void Toggle3() { WndManager.DestoryDialog <ClickSkillDescWnd>(); if (MyHead.Toggle3.value == false) { return; } MyHead.LblLocation.gameObject.SetActive(true); U3DUtil.DestroyAllChild(MyHead.GoParent, false); }
void BtnYES_OnClickEventHandler(UIButton sender) { WndManager.DestoryDialog <IsSaveFangAnWnd>(); ShipCanvasWnd wnd = WndManager.FindDialog <ShipCanvasWnd>(); if (wnd) { wnd.BtnNext_OnClickEventHandler(null); } }
/// <summary> /// 穿装备回应 /// </summary> /// <param name="nErrorCode"></param> private void SoldierEquipResponse(int nErrorCode) { m_bCanEquipsReady = false; //NGUIUtil.DebugLog("穿装备回应"); if (nErrorCode == 0) { RefreshUI(); } WndManager.DestoryDialog <EquipmentInfoWnd>(); WndManager.DestoryDialog <EquipComposeWnd>(); }
void SetLeftTime() { if (m_iLimitCounter < 0) { MyHead.BtnAttack.enabled = false; WndManager.DestoryDialog <CombatCountDownWnd>(); GotoSelectSoldiers(); } SetAttackTime(m_iLimitCounter); m_iLimitCounter--; }
void DestoryDialogCallBack(object o) { WndManager.DestoryDialog <PdbycWnd>(); WndManager.DestoryDialog <HeroIntroduceWnd>(); WndManager.DestoryDialog <AddSkillWnd>(); PdbbbWnd wnd = WndManager.FindDialog <PdbbbWnd>(); if (wnd) { wnd.RefreshUI(); } }
void BtnNO_OnClickEventHandler(UIButton sender) { ShipPlan P = ShipPlanDC.GetCurShipPlan(); P.ResetPlan(); WndManager.DestoryDialog <IsSaveFangAnWnd>(); ShipCanvasWnd wnd = WndManager.FindDialog <ShipCanvasWnd>(); if (wnd) { wnd.DoReturn(); } }
// Update is called once per frame void Update() { if (iDep != 0 && iDep != gameObject.transform.localPosition.z) { gameObject.transform.localPosition = new Vector3(gameObject.transform.localPosition.x, gameObject.transform.localPosition.y, iDep); } if (ShowDuration <= 0) { WndManager.DestoryDialog <TipWnd>(); } else { ShowDuration -= Time.deltaTime; } }
void DoFinish() { //U3DUtil.DestroyAllChild(BattleEnvironmentM.GetLifeMBornNode(true).gameObject,false); RoomMap.CreateCanvansArea(); ShipPlan Plan = ShipPlanDC.GetCurShipPlan(); Plan.ReCalcShipBuildInfoXY(XYmode.Save2Edit); BattleEnvironmentM.SetBattleEnvironmentMode(BattleEnvironmentMode.Edit); BattleEnvironmentM.BuildScene(); WndManager.DestoryDialog <ShipShowWnd>(); WndManager.DestoryDialog <FangAnMenuWnd>(); GenerateShip.CreateMiddleBeam(); WndManager.GetDialog <ShipCanvasWnd>().ShowDialog(); MainCameraM.s_Instance.EnableOthOn(true); }
void ShowCombatResult() { CaptionUpgradeWnd cuw = WndManager.FindDialog <CaptionUpgradeWnd>(); if (cuw != null) { WndManager.DestoryDialog <CaptionUpgradeWnd>(); } WndManager.ShowAllWnds(false); StageResultWnd wnd = WndManager.GetDialog <StageResultWnd>(); BattleEnvironmentMode battleMode = BattleEnvironmentM.GetBattleEnvironmentMode(); if (wnd != null) { wnd.SetStageResult(StageDC.GetStageResult()); } }
// Update is called once per frame void Update() { if (iDep != 0 && iDep != gameObject.transform.localPosition.z) { gameObject.transform.localPosition = new Vector3(gameObject.transform.localPosition.x, gameObject.transform.localPosition.y, iDep); } if (ShowDuration <= 0) { if (FinishCallBack != null) { FinishCallBack(); } WndManager.DestoryDialog <FreeSizeTipWnd>(); } else { ShowDuration -= Time.deltaTime; } }
/// <summary> /// 添加属性,升阶,图鉴 /// </summary> /// <param name="Info">Info.</param> /// <param name="wndType">Window type.</param> private void AddDetailInfo(BuildInfo Info, WndType wndType) { if (wndType == WndType.ShuXing) { WndManager.DestoryDialog <TrapShengJieIntroduceWnd>(); TrapShuXingIntroduceWnd wnd = WndManager.FindDialog <TrapShuXingIntroduceWnd>(); if (wnd == null) { wnd = WndManager.GetDialog <TrapShuXingIntroduceWnd>(); wnd.transform.parent = MyHead.SprTrapIntorduct.transform; wnd.transform.localScale = MyHead.SprTrapIntorduct.transform.localScale; wnd.transform.localPosition = Vector3.zero; wnd.transform.localRotation = MyHead.SprTrapIntorduct.transform.localRotation; } if (wnd != null) { wnd.SetBuildInfo(Info); } } else if (wndType == WndType.ShengJie) { WndManager.DestoryDialog <TrapShuXingIntroduceWnd>(); TrapShengJieIntroduceWnd wnd = WndManager.FindDialog <TrapShengJieIntroduceWnd>(); if (wnd == null) { wnd = WndManager.GetDialog <TrapShengJieIntroduceWnd>(); wnd.transform.parent = MyHead.SprTrapIntorduct.transform; wnd.transform.localScale = MyHead.SprTrapIntorduct.transform.localScale; wnd.transform.localPosition = Vector3.zero; wnd.transform.localRotation = MyHead.SprTrapIntorduct.transform.localRotation; } if (wnd != null) { wnd.SetBuildInfo(Info, this); } } else if (wndType == WndType.TuJian) { WndManager.DestoryDialog <TrapShuXingIntroduceWnd>(); WndManager.DestoryDialog <TrapShengJieIntroduceWnd>(); } }
public void Back(UIButton sender) { BSC.AntiAllRegisterHooks(); if (BattleEnvironmentM.GetBattleEnvironmentMode() == BattleEnvironmentMode.CombatPVE) { SceneM.Load(ViewStageScene.GetSceneName(), false, null, false); } else { WndManager.DestoryDialog <SelectSoldierwnd>(); WndManager.DestoryDialog <CombatWnd>(); CombatInfoWnd wnd = WndManager.GetDialog <CombatInfoWnd>(); if (wnd != null) { wnd.SetWndMode(CombatInfoMode.view); } WndManager.GetDialog <CombatCountDownWnd>(); MainCameraM.s_Instance.EnableDrag(true); } }