예제 #1
0
    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);
    }
예제 #2
0
 void BtnClose_OnClickEventHandler(UIButton sender)
 {
     WndManager.DestoryDialog <ClickSkillDescWnd>();
     //关闭动画会有卡顿感觉,和UE沟通后改成直接关闭
     //WndEffects.DoCloseWndEffect(gameObject,DestoryDialogCallBack);
     DestoryDialogCallBack(null);
 }
예제 #3
0
    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();
        }
    }
예제 #4
0
 public static void DestoryDialogCallBack(object g)
 {
     WndManager.DestoryDialog <BeiBaoWnd>();
     WndManager.DestoryDialog <ItemInfoWnd>();
     //		WndManager.ShowAllWnds(true);
     MainCameraM.s_Instance.EnableDrag(true);
 }
예제 #5
0
 void BtnClose_OnClickEventHandler(UIButton sender)
 {
     WndManager.DestoryDialog <SoldierInfoWnd>();
     WndManager.DestoryDialog <HeroIntroduceWnd>();
     WndManager.DestoryDialog <AddSkillWnd>();
     WndManager.DestoryDialog <SoldierScrollWnd>();
 }
예제 #6
0
    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);
        }
    }
예제 #7
0
    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);
    }
예제 #8
0
 void ClickUp()
 {
     if (m_wnd)
     {
         WndManager.DestoryDialog <StageTipWnd>();
     }
 }
예제 #9
0
 void BtnRebattle_OnClickEventHandler(UIButton sender)
 {
     Time.timeScale = 1f;
     WndManager.DestoryDialog <CombatSchedulerWnd>();
     BSC.AntiAllRegisterHooks();
     SceneM.Load(ViewStageScene.GetSceneName(), false, null, false);
 }
예제 #10
0
    void CloseCallBack(object o)
    {
        UIPanel panel = GetComponent <UIPanel>();

        Debug.Log("CaptionUpgradeWnd  " + panel.startingRenderQueue);
        WndManager.DestoryDialog <CaptionUpgradeWnd>();
    }
예제 #11
0
 void ClearUI()
 {
     WndManager.DestoryDialog <AddSkillWnd>();
     if (MyHead.EquipmentsParent)
     {
         U3DUtil.DestroyAllChild(MyHead.EquipmentsParent);
     }
 }
예제 #12
0
 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);
 }
예제 #13
0
 /// <summary>
 /// 902 升级
 /// </summary>
 /// <param name="nErrorCode"></param>
 void TrapLevelUp_Resp(int nErrorCode)
 {
     if (nErrorCode == 0)
     {
         WndManager.DestoryDialog <TrapUplevWnd>();
         m_parentwnd.UpLevelEffect();
     }
 }
예제 #14
0
 void BtnConfirm_OnClickEventHandler(UIButton sender)
 {
     if (CallBackFun != null)
     {
         CallBackFun();
     }
     WndManager.DestoryDialog <TradeConfirmWnd>();
 }
예제 #15
0
 void BtnOK_OnClickEventHandler(UIButton sender)
 {
     if (OKButtonOnClick != null)
     {
         WndManager.DestoryDialog <SaveFangAnWnd>();
         OKButtonOnClick(sender);
     }
 }
예제 #16
0
    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;
        }
    }
예제 #17
0
    /// <summary>
    /// 切换到上一个炮弹兵
    /// </summary>
    void BtnSoldierPrev_OnClickEventHandler(UIButton sender)
    {
        WndManager.DestoryDialog <ClickSkillDescWnd>();

        SoldierInfo info1 = m_allExistSoldier.PrevOf <SoldierInfo>(m_soldierInfo);

        SetData(info1);
        m_preSoldierInfo.Copy(info1);
    }
예제 #18
0
 /// <summary>
 /// 更新玩家信息
 /// </summary>
 private void BuildAnnalyze(int nErrorCode)
 {
     if (nErrorCode == 0)
     {
         //弹出拆解结果
         WndManager.DestoryDialog <TrapShowWnd>();
         WndManager.DestoryDialog <TrapSplitWnd>();
     }
 }
예제 #19
0
 /// <summary>
 /// 图鉴(资源未出)
 /// </summary>
 public void Toggle3()
 {
     WndManager.DestoryDialog <ClickSkillDescWnd>();
     if (MyHead.Toggle3.value == false)
     {
         return;
     }
     MyHead.LblLocation.gameObject.SetActive(true);
     U3DUtil.DestroyAllChild(MyHead.GoParent, false);
 }
예제 #20
0
    void BtnYES_OnClickEventHandler(UIButton sender)
    {
        WndManager.DestoryDialog <IsSaveFangAnWnd>();
        ShipCanvasWnd wnd = WndManager.FindDialog <ShipCanvasWnd>();

        if (wnd)
        {
            wnd.BtnNext_OnClickEventHandler(null);
        }
    }
예제 #21
0
 /// <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>();
 }
예제 #22
0
    void SetLeftTime()
    {
        if (m_iLimitCounter < 0)
        {
            MyHead.BtnAttack.enabled = false;
            WndManager.DestoryDialog <CombatCountDownWnd>();
            GotoSelectSoldiers();
        }

        SetAttackTime(m_iLimitCounter);
        m_iLimitCounter--;
    }
예제 #23
0
    void DestoryDialogCallBack(object o)
    {
        WndManager.DestoryDialog <PdbycWnd>();
        WndManager.DestoryDialog <HeroIntroduceWnd>();
        WndManager.DestoryDialog <AddSkillWnd>();
        PdbbbWnd wnd = WndManager.FindDialog <PdbbbWnd>();

        if (wnd)
        {
            wnd.RefreshUI();
        }
    }
예제 #24
0
    void BtnNO_OnClickEventHandler(UIButton sender)
    {
        ShipPlan P = ShipPlanDC.GetCurShipPlan();

        P.ResetPlan();
        WndManager.DestoryDialog <IsSaveFangAnWnd>();
        ShipCanvasWnd wnd = WndManager.FindDialog <ShipCanvasWnd>();

        if (wnd)
        {
            wnd.DoReturn();
        }
    }
예제 #25
0
 // 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;
     }
 }
예제 #26
0
    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);
    }
예제 #27
0
    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());
        }
    }
예제 #28
0
 // 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;
     }
 }
예제 #29
0
 /// <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>();
     }
 }
예제 #30
0
 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);
     }
 }