Exemple #1
0
 private void OnReturnBtnClick(GameObject sender)
 {
     Window_Alert.ShowAlertDefalut(ConfigText.GetDefalutString(TextForMatType.AlertUIText, 5), () =>
     {
         moduleBordlands.SendExitBordland();
     }, () => { });
 }
Exemple #2
0
    private static void ShowWarningDialog(string rMessage)
    {
#if UNITY_EDITOR
        if (UnityEditor.EditorApplication.isPlaying)
#endif
        Window_Alert.ShowAlertDefalut(rMessage,
                                      () => { Module_Login.instance.LogOut(false); }, null, "", "", false);
        Logger.LogError(rMessage);
    }
Exemple #3
0
    protected override void OnBecameVisible(bool oldState, bool forward)
    {
        moduleAwakeMatch.enterGame = false;

        if (!teamWindow.Initialize())
        {
            Window_Alert.ShowAlertDefalut(Util.Format(ConfigText.GetDefalutString(68001), moduleAwakeMatch.StageId), () => { Hide(); }, null, string.Empty, string.Empty, false);
            return;
        }

        moduleGlobal.ShowGlobalLayerDefault(1, false);
    }
    private void OnExchange()
    {
        var prop = ConfigManager.Get <PropItemInfo>(_content.itemId);

        if (prop == null)
        {
            return;
        }

        Window_Alert.ShowAlertDefalut(Util.Format(ConfigText.GetDefalutString(199, 0), BuyCount * prop.diamonds, BuyCount, prop.itemName), () =>
        {
            moduleShop.FreeBuy((ushort)_content.itemId, (uint)BuyCount);
        }, () => {}, ConfigText.GetDefalutString(199, 1), ConfigText.GetDefalutString(199, 2));
    }
 private void OnCancelRequest(PetTaskItem obj)
 {
     Window_Alert.ShowAlertDefalut(ConfigText.GetDefalutString(TextForMatType.PetTrainFastComplete, 6),
                                   () =>
     {
         var msg          = PacketObject.Create <CsPetTaskOperator>();
         msg.operatorCode = 1;
         msg.taskId       = obj.Task.ID;
         session.Send(msg);
     },
                                   () => { },
                                   ConfigText.GetDefalutString(TextForMatType.PetTrainFastComplete, 4),
                                   ConfigText.GetDefalutString(TextForMatType.PetTrainFastComplete, 5));
 }
Exemple #6
0
    private void OnExcuteMulti()
    {
        var error = Module_Chase.CheckMoppingUp(task, SingleMoppingUpMax);

        if (error == MoppingUpException.None)
        {
            Window_Alert.ShowAlertDefalut(Util.Format(ConfigText.GetDefalutString(TextForMatType.MoppingUpUI, 0), task.taskConfigInfo.fatigueCount * SingleMoppingUpMax, SingleMoppingUpMax), () =>
            {
                //TODO: 开始扫荡
                moduleChase.RequestMoppingUp((ushort)task.taskConfigInfo.ID, SingleMoppingUpMax);
            }, null, ConfigText.GetDefalutString(TextForMatType.MoppingUpUI, 1), ConfigText.GetDefalutString(TextForMatType.MoppingUpUI, 2));
        }
        else
        {
            ProcessException(error);
        }
    }
Exemple #7
0
    private void OnMatchSuccess(ScTeamPveMatchSuccess msg)
    {
        if (msg.result == 3)
        {
            Window_Alert.ShowAlertDefalut(ConfigText.GetDefalutString((int)TextForMatType.AwakeStage, 10),
                                          () => { moduleAwakeMatch.Request_EnterRoom(false, currentTask); },
                                          () => Hide());
            return;
        }

        if (msg.result != 0)
        {
            moduleGlobal.ShowMessage(9806, msg.result);
            return;
        }
        Hide();

        ShowAsync <Window_TeamMatch>();
    }
    public void Request_EnterRoom(bool enter, ChaseTask task)
    {
        if (task == null)
        {
            return;
        }

        if (!enter && !moduleGlobal.CheckSourceMd5(false))
        {
            var ct = ConfigManager.Get <ConfigText>(25);
            Window_Alert.ShowAlertDefalut(ct[2], () =>
            {
                Internal_RequestEnterRoom(enter, task);
            }, Game.Quit, ct[3], ct[4], false);
            return;
        }

        //if (task.Equals(CurrentTask))
        //    return;

        Internal_RequestEnterRoom(enter, task);
    }
Exemple #9
0
    private void OnDecompose()
    {
        if (decomposeDict.Count == 0)
        {
            moduleGlobal.ShowMessage((int)TextForMatType.DecomposeUI, 4);
            return;
        }

        var num = 0;

        foreach (var kv in decomposeDict)
        {
            num += kv.Value.count;
        }
        Window_Alert.ShowAlertDefalut(Util.Format(ConfigText.GetDefalutString(TextForMatType.DecomposeUI, 2), num), () =>
        {
            moduleFurnace.RequestComposeItem(new List <DecomposePair>(decomposeDict.Values));
        },
                                      null,
                                      ConfigText.GetDefalutString(TextForMatType.DecomposeUI, 0),
                                      ConfigText.GetDefalutString(TextForMatType.DecomposeUI, 1));
    }
    private void OnBuyClick()
    {
        if (m_chargeItem == null || m_rewards == null)
        {
            return;
        }

        var day = Module_Charge.CalcCardDays(m_chargeItem.info.endTime);

        if (day < m_rewards.oneinfo.Length)
        {
            var t = Util.GetDateTime((long)m_chargeItem.info.endTime);
            Window_Alert.ShowAlertDefalut(Util.Format(ConfigText.GetDefalutString(TextForMatType.RechargeUIText, 28),
                                                      t.Month, t.Day),
                                          () =>
            {
                moduleCharge.RequestBuyProduct(m_chargeItem);
            }, () => {});
            return;
        }

        moduleCharge.RequestBuyProduct(m_chargeItem);
    }
Exemple #11
0
    public void Friedreplay(bool isMd5Diffrent = false)
    {
        //成功加载后就不能再处理加载失败操作了。(如果对方同意邀请后,再次收到邀请会返回邀请失败)
        if (modulePVP.loading)
        {
            return;
        }

        //没有好友同意到我的邀请
        isbaning = true;
        DispatchModuleEvent(EventInvationFailed, isMd5Diffrent);
        if (isMd5Diffrent)
        {
            var ct = ConfigManager.Get <ConfigText>(25);
            if (moduleGlobal.CheckSourceMd5(false))
            {
                Window_Alert.ShowAlertDefalut(ct[6], () => { });
            }
            else
            {
                Window_Alert.ShowAlertDefalut(ct[7], Game.Quit, () => {}, ct[4], ct[8], false);
            }
        }
    }
Exemple #12
0
    void _ME(ModuleEvent <Module_Union> e)
    {
        switch (e.moduleEvent)
        {
        case Module_Union.EventUnionBuyEffect:
            var effId = Util.Parse <int>(e.param1.ToString());
            if (m_tipPlane.gameObject.activeInHierarchy)
            {
                SetTipPlane(effId);
            }
            SetEffect();
            CountDown(1);
            break;

        case Module_Union.EventUnionBossOpen:
            //开启
            SetLeft();
            SetRight();
            m_rightTip.gameObject.SetActive(false);
            break;

        case Module_Union.EventUnionBossClose:
            //关闭
            if (!actived || moduleUnion.EnterBossTask)
            {
                return;
            }
            moduleUnion.SetNewBoss();
            SetLeft();
            SetRight();
            break;

        case Module_Union.EventUnionBossChange:
            //设置更改
            SetBossSet();
            SetLeft();
            SetRight();
            m_setPlane.gameObject.SetActive(false);
            break;

        case Module_Union.EventUnionBossHurt:
            //刷新伤害值
            SetLeft();
            break;

        case Module_Union.EventUnionBossCanGet:
            //有奖励发生变化
            SetLeft();
            break;

        case Module_Union.EventUnionBossSortHurt:
            //查看排行榜
            SetRankInfo();
            break;

        case Module_Union.EventUnionBossKillCool:
            //冷却时间完成
            //m_diedEnd = false;
            //m_enterBossBtn.interactable = true;
            //m_rightTip.gameObject.SetActive(false);
            //m_openBossBtn.gameObject.SetActive(false);
            //m_enterBossBtn.gameObject.SetActive(true);
            break;

        case Module_Union.EventUnionRewardGet:
            //奖励领取成功
            var reward = e.param1 as PItem2[];
            var boxid  = Util.Parse <int>(e.param2.ToString());
            ShowSuccedReward(reward, boxid);
            break;

        case Module_Union.EventUnionBossOver:
            m_diedEnd = true;
            break;

        case Module_Union.EventUnionSelfExit:
            //自己被踢出或者自己退出
            var type = Util.Parse <int>(e.param1.ToString());
            var pos  = Util.Parse <int>(e.param2.ToString());

            if (type != 0 || pos == 0)
            {
                GetMyUnionExit();
            }
            else if (actived)
            {
                Window_Alert.ShowAlertDefalut(ConfigText.GetDefalutString(242, 210),
                                              () => { GetMyUnionExit(); }, () => { GetMyUnionExit(); });
            }
            break;
        }
    }
 private void OnCreateRoleClick()
 {
     Window_Alert.ShowAlertDefalut(ConfigText.GetDefalutString(TextForMatType.SelectRoleUI, 8), () => { moduleSelectRole.CreateRole(); });
 }