Exemple #1
0
        private void OnReceivedLogin(EventMessageArgs args)
        {
            bool success = args.Get <bool>("status");

            if (success)
            {
                GlobalVariables.Set(Const.ACCOUNT, account);

                if (remember)
                {
                    GlobalVariables.Set(Const.PASSWORD, password);
                }
                UIManager.Instance.Open(UIPanel.UILoading);

                ScheduleLogic.Instance.callback = () =>
                {
                    UIManager.Instance.CloseAll();
                    UIManager.Instance.Open(UIPanel.UIMain);
                };
                ScheduleLogic.Instance.Enter();
            }
            else
            {
                string error = args.Get <string>("message");

                UIQuickEntry.OpenUIHorseLamp(error);
            }
        }
Exemple #2
0
 private void OnClickLogin()
 {
     if (string.IsNullOrEmpty(account))
     {
         UIQuickEntry.OpenUITips("账号不能为空");
     }
     else if (string.IsNullOrEmpty(password))
     {
         UIQuickEntry.OpenUITips("密码不能为空");
     }
     else
     {
         LoginLogic.Instance.RequestInformation(account, password);
     }
 }
Exemple #3
0
        private void Update()
        {
            if (Input.GetKeyDown(KeyCode.A))
            {
                UIQuickEntry.OpenUIConfirm("A", "B", () =>
                {
                    Debug.LogError(Random.Range(0, 100));
                });
            }
            else if (Input.GetKeyDown(KeyCode.B))
            {
                index++;

                UIQuickEntry.OpenUIHorseLamp(string.Format("当前测试第{0}条消息!", index));
            }
            else if (Input.GetKeyDown(KeyCode.C))
            {
                UIQuickEntry.OpenUIReward(new Data.Reward()
                {
                    title      = "XXX",
                    currencies = new List <Currency>()
                    {
                        new Currency(CurrencyEnum.Gold, 999),
                        new Currency(CurrencyEnum.Diamond, 10),
                    },
                    props = new List <Prop>()
                    {
                        new Prop()
                        {
                            parallelism = 0
                        },
                        new Prop()
                        {
                            parallelism = 1
                        },
                        new Prop()
                        {
                            parallelism = 2
                        },
                        new Prop()
                        {
                            parallelism = 3
                        },
                        new Prop()
                        {
                            parallelism = 4
                        },
                    }
                });
            }
            else if (Input.GetKeyDown(KeyCode.D))
            {
                UIManager.Instance.Open(UIPanel.UILotteryDraw);
            }
            else if (Input.GetKeyDown(KeyCode.E))
            {
                UIQuickEntry.OpenUITips("test");
            }
            else if (Input.GetKeyDown(KeyCode.F))
            {
                UIQuickEntry.OpenUINotice("test");
            }
        }