public void IsMedalToggle(bool IsClick)
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("ShopPanelScript_hotfix", "IsMedalToggle"))
        {
            ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.ShopPanelScript_hotfix", "IsMedalToggle", null, IsClick);
            return;
        }

        if (IsClick)
        {
            ToastScript.createToast("徽章兑换暂未开放");
            _type = 4;
            Init();
        }
    }
Ejemplo n.º 2
0
    public void onReceive_GetUserBag(string data)
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("BagPanelScript_hotfix", "onReceive_GetUserBag"))
        {
            ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.BagPanelScript_hotfix", "onReceive_GetUserBag", null, data);
            return;
        }

        {
            JsonData jsonData = JsonMapper.ToObject(data);
            var      code     = (int)jsonData["code"];
            if (code == (int)Consts.Code.Code_OK)
            {
                UserData.propData = JsonMapper.ToObject <List <UserPropData> >(jsonData["prop_list"].ToString());
                for (int i = 0; i < PropData.getInstance().getPropInfoList().Count; i++)
                {
                    PropInfo propInfo = PropData.getInstance().getPropInfoList()[i];
                    for (int j = 0; j < UserData.propData.Count; j++)
                    {
                        UserPropData userPropData = UserData.propData[j];
                        if (propInfo.m_id == userPropData.prop_id)
                        {
                            userPropData.prop_icon = propInfo.m_icon;
                            userPropData.prop_name = propInfo.m_name;
                        }
                    }
                }

                if (UserData.medal > 0)
                {
                    var userPropData = new UserPropData();
                    userPropData.prop_icon = "icon_huizhang";
                    userPropData.prop_id   = (int)TLJCommon.Consts.Prop.Prop_huizhang;
                    userPropData.prop_name = "徽章";
                    userPropData.prop_num  = UserData.medal;
                    UserData.propData.Add(userPropData);
                }
            }
            else
            {
                ToastScript.createToast("用户背包数据错误");
                return;
            }
        }
        UpdateUI();
    }
Ejemplo n.º 3
0
    public void onReceive_Login(string data)
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("LoginScript_hotfix", "onReceive_Login"))
        {
            ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.LoginScript_hotfix", "onReceive_Login", null, data);
            return;
        }

        if (++TestCount == TestAllCout)
        {
            stopwatch.Stop();
            LogUtil.Log("时间:" + stopwatch.ElapsedMilliseconds);
        }

        NetLoading.getInstance().Close();

        JsonData jd   = JsonMapper.ToObject(data);
        int      code = (int)jd["code"];

        if (code == (int)TLJCommon.Consts.Code.Code_OK)
        {
            string uid = jd["uid"].ToString();

            // 压力测试的时候拦截掉下面的逻辑
            // return;

            PlayerPrefs.SetString("account", m_inputAccount.text);
            PlayerPrefs.SetString("password", m_inputPassword.text);

            UserData.uid = uid;

            SceneManager.LoadScene("MainScene");
        }
        else if (code == (int)TLJCommon.Consts.Code.Code_PasswordError)
        {
            ToastScript.createToast("密码错误");
        }
        else if (code == (int)TLJCommon.Consts.Code.Code_AccountNoExist)
        {
            ToastScript.createToast("用户不存在");
        }
        else
        {
            ToastScript.createToast("服务器内部错误");
        }
    }
    public static void httpCallBack(string tag, string data)
    {
        try
        {
            // 读取配置文件
            {
                InitWords(data);
            }
        }
        catch (Exception ex)
        {
            LogUtil.Log("获取屏蔽词配置文件出错:" + ex.Message);
            ToastScript.createToast("获取屏蔽词配置文件出错");

            //throw ex;
        }
    }
Ejemplo n.º 5
0
    public void onClickQueRenBuQian()
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("BuQianQueRenPanelScript_hotfix", "onClickQueRenBuQian"))
        {
            ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.BuQianQueRenPanelScript_hotfix", "onClickQueRenBuQian", null, null);
            return;
        }

        if (UserData.gold < getBuQianGoldHuaFei())
        {
            ToastScript.createToast("金币不足");
            return;
        }

        OtherData.s_sign30PanelScript.reqSign(OtherData.s_sign30PanelScript.m_curChoiceId);
    }
    public void onCallBackBindTuiGuangCode(string data)
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("ShuRuTuiGuangCodePanelScript_hotfix", "onCallBackBindTuiGuangCode"))
        {
            ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.ShuRuTuiGuangCodePanelScript_hotfix", "onCallBackBindTuiGuangCode", null, data);
            return;
        }

        NetLoading.getInstance().Close();

        JsonData jsonData = JsonMapper.ToObject(data);
        int      code     = (int)jsonData["code"];

        if (code == (int)TLJCommon.Consts.Code.Code_OK)
        {
            string reward = (string)jsonData["reward"];

            if (reward.CompareTo("") != 0)
            {
                List <string> list = new List <string>();
                CommonUtil.splitStr(reward, list, ';');
                for (int i = 0; i < list.Count; i++)
                {
                    GameUtil.changeData(GameUtil.getPropIdFromReward(list[i]), GameUtil.getPropNumFromReward(list[i]));

                    ShowRewardPanelScript.Show(reward, false);
                }

                ToastScript.createToast("领取奖励成功");

                Destroy(gameObject);
            }
            else
            {
                ToastScript.createToast("异常:奖励为空");
            }
        }
        else
        {
            string msg = (string)jsonData["msg"];

            ToastScript.createToast(msg);
        }
    }
Ejemplo n.º 7
0
    // Use this for initialization
    void Start()
    {
        gameObject.transform.Find("BtnList/Button_sign").GetComponent <Button>().onClick.AddListener(() =>
        {
            SignScript.show();
        });

        gameObject.transform.Find("BtnList/Button_activity").GetComponent <Button>().onClick.AddListener(() =>
        {
            ToastScript.createToast("暂无活动");
        });

        gameObject.transform.Find("BtnList/Button_bag").GetComponent <Button>().onClick.AddListener(() =>
        {
            ToastScript.createToast("背包");
        });

        gameObject.transform.Find("BtnList/Button_shop").GetComponent <Button>().onClick.AddListener(() =>
        {
            ToastScript.createToast("商城");
        });

        gameObject.transform.Find("BtnList/Button_task").GetComponent <Button>().onClick.AddListener(() =>
        {
            ToastScript.createToast("任务");
        });

        gameObject.transform.Find("BtnList/Button_jingji").GetComponent <Button>().onClick.AddListener(() =>
        {
            ToastScript.createToast("竞技");
        });

        gameObject.transform.Find("BtnList/Button_zhanyi").GetComponent <Button>().onClick.AddListener(() =>
        {
            //SceneManager.LoadScene("GameScene");
            SceneManager.LoadScene("DiLaoScene");
        });

        gameObject.transform.Find("Head/Button").GetComponent <Button>().onClick.AddListener(() =>
        {
            PlayerInfoScript.show();
        });

        reqUserInfo();
    }
Ejemplo n.º 8
0
        private async void RequestSetPlayerSound(int PlayerSound)
        {
            UINetLoadingComponent.showNetLoading();
            G2C_SetPlayerSound g2cSetPlayerSound = (G2C_SetPlayerSound)await SessionComponent.Instance.Session.Call(new C2G_SetPlayerSound { Uid = PlayerInfoComponent.Instance.uid, PlayerSound = PlayerSound });

            UINetLoadingComponent.closeNetLoading();

            if (g2cSetPlayerSound.Error != ErrorCode.ERR_Success)
            {
                ToastScript.createToast(g2cSetPlayerSound.Message);

                return;
            }

            PlayerInfoComponent.Instance.GetPlayerInfo().PlayerSound = PlayerSound;

            ToastScript.createToast("设置成功");
        }
Ejemplo n.º 9
0
    public void onClickRegister()
    {
        if ((m_inputField_account.text.CompareTo("") == 0) || (m_inputField_psw.text.CompareTo("") == 0))
        {
            ToastScript.createToast("请输入账号密码");

            return;
        }

        {
            JObject jo = new JObject();
            jo.Add("tag", "Register");
            jo.Add("account", m_inputField_account.text);
            jo.Add("psw", m_inputField_psw.text);

            NetUtil.getInstance().reqNet(m_netListen, "Register", jo.ToString());
        }
    }
    public void onClickOK()
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("CheckSecondPSWPanelScript_hotfix", "onClickOK"))
        {
            ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.CheckSecondPSWPanelScript_hotfix", "onClickOK", null, null);
            return;
        }

        // 检测密码是否合格
        {
            if (m_inputField_psw.text.CompareTo("") == 0)
            {
                ToastScript.createToast("请输入密码");
                return;
            }

            for (int i = 0; i < m_inputField_psw.text.Length; i++)
            {
                string str = m_inputField_psw.text[i].ToString();
                if (((CommonUtil.charToAsc(str) >= 48) && (CommonUtil.charToAsc(str) <= 57) ||
                     ((CommonUtil.charToAsc(str) >= 65) && (CommonUtil.charToAsc(str) <= 90) ||
                      ((CommonUtil.charToAsc(str) >= 97) && (CommonUtil.charToAsc(str) <= 122)))))
                {
                }
                else
                {
                    ToastScript.createToast("密码格式不对");

                    return;
                }
            }

            if (m_inputField_psw.text.Length < 6)
            {
                ToastScript.createToast("密码至少6位");
                return;
            }
        }

        NetLoading.getInstance().Show();
        LogicEnginerScript.Instance.GetComponent <CheckSecondPSWRequest>().setData(m_inputField_psw.text);
        LogicEnginerScript.Instance.GetComponent <CheckSecondPSWRequest>().OnRequest();
    }
Ejemplo n.º 11
0
    public void GetIdentification(InputField input)
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("RealNameScript_hotfix", "GetIdentification"))
        {
            ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.RealNameScript_hotfix", "GetIdentification", null, input);
            return;
        }

        _isCorrectIdentification = VerifyRuleUtil.CheckIDCard(input.text);
        if (_isCorrectIdentification)
        {
            _identification = input.text;
        }
        else
        {
            ToastScript.createToast("请输入正确的身份证");
        }
    }
Ejemplo n.º 12
0
    public void onClickJiXu()
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc(m_hotfix_class, "onClickJiXu"))
        {
            ILRuntimeUtil.getInstance().getAppDomain().Invoke(m_hotfix_path, "onClickJiXu", null, null);
            return;
        }

        if (UserData.gold < 1000)
        {
            ToastScript.createToast("金币不足1000,无法继续游戏");
            return;
        }

        m_parentScript.cleanRoom();
        m_parentScript.m_DDZ_NetReqLogic.reqJoinRoom(TLJCommon.Consts.GameRoomType_DDZ_Normal);
        Destroy(gameObject);
    }
Ejemplo n.º 13
0
    public void onReceive_OldPlayerBind(string data)
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("OldPlayerBindPanelScript_hotfix", "onReceive_OldPlayerBind"))
        {
            ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.OldPlayerBindPanelScript_hotfix", "onReceive_OldPlayerBind", null, data);
            return;
        }

        JsonData jsonData = JsonMapper.ToObject(data);
        var      code     = (int)jsonData["code"];

        if (code == (int)Consts.Code.Code_OK)
        {
            ToastScript.createToast("绑定成功,请去邮箱领取奖励");

            LogicEnginerScript.Instance.GetComponent <GetEmailRequest>().OnRequest();

            Destroy(gameObject);
        }
        else if (code == (int)Consts.Code.Code_OldPlayerUidIsNotExist)
        {
            ToastScript.createToast("您输入的UID不存在");
        }
        else if (code == (int)Consts.Code.Code_TheOldUidIsUsed)
        {
            ToastScript.createToast("您输入的UID已经被绑定过,不可重复使用");
        }
        else if (code == (int)Consts.Code.Code_TheUidIsBind)
        {
            ToastScript.createToast("您的账号已经绑定过,不可重复绑定");
        }
        else if (code == (int)Consts.Code.Code_ThePhoneIsBindOldUid)
        {
            ToastScript.createToast("您的手机已绑定过,不可重复绑定");
        }
        else
        {
            ToastScript.createToast("绑定失败:" + code.ToString());
        }

        NetLoading.getInstance().Close();
    }
Ejemplo n.º 14
0
        public void onClick_huafei5()
        {
            if (PlayerInfoComponent.Instance.GetPlayerInfo().HuaFeiNum < 500)
            {
                ToastScript.createToast("您的话费余额不足");

                return;
            }

            if (string.IsNullOrEmpty(PlayerInfoComponent.Instance.GetPlayerInfo().Phone))
            {
                Game.Scene.GetComponent <UIComponent>().Remove(UIType.UIUseHuaFei);
                Game.Scene.GetComponent <UIComponent>().Create(UIType.UIBindPhone);

                return;
            }

            RequestUseHuaFei(5 * 100, 1);
        }
Ejemplo n.º 15
0
        private async void RequestGetZhuanPanState()
        {
            UINetLoadingComponent.showNetLoading();
            G2C_GetZhuanPanState g2cGetZhuanPanState = (G2C_GetZhuanPanState)await SessionComponent.Instance.Session.Call(new C2G_GetZhuanPanState { Uid = PlayerInfoComponent.Instance.uid });

            UINetLoadingComponent.closeNetLoading();

            if (g2cGetZhuanPanState.Error != ErrorCode.ERR_Success)
            {
                ToastScript.createToast(g2cGetZhuanPanState.Message);

                return;
            }

            ZhuanPanCount = g2cGetZhuanPanState.ZhuanPanCount;
            LuckyValue    = g2cGetZhuanPanState.LuckyValue;

            xingyunzhi.transform.Find("Text_MyLuckyValue").GetComponent <Text>().text    = LuckyValue.ToString();
            Button_ChouJiang.transform.Find("Text_restCount").GetComponent <Text>().text = ZhuanPanCount.ToString();
        }
Ejemplo n.º 16
0
        public void Awake()
        {
            ReferenceCollector rc = GetParent <UI>().GameObject.GetComponent <ReferenceCollector>();

            UIExpression = rc.Get <GameObject>("UIExpression");

            CommonUtil.SetTextFont(this.GetParent <UI>().GameObject);

            UIExpression.GetComponent <Button>().onClick.Add(() =>
            {
                if (GameUtil.isCanUseEmoji())
                {
                    RequestChat();
                }
                else
                {
                    ToastScript.createToast("不能发送动态表情,请去商店购买表情包");
                }
            });
        }
Ejemplo n.º 17
0
    public void OnClickSendCode()
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("BindPhoneScript_hotfix", "OnClickSendCode"))
        {
            ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.BindPhoneScript_hotfix", "OnClickSendCode", null, null);
            return;
        }

        if (_isCorrectPhone)
        {
            LogicEnginerScript.Instance.GetComponent <SendVerificationCodeRequest>().CallBack =
                sendVerificationCodeCallBack;
            LogicEnginerScript.Instance.GetComponent <SendVerificationCodeRequest>().OnRequest(_phoneNum);
        }
        else
        {
            ToastScript.createToast("请输入正确的手机号");
        }
    }
Ejemplo n.º 18
0
    //发送验证码
    public void sendVerificationCodeCallBack(string data)
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("BindPhoneScript_hotfix", "sendVerificationCodeCallBack"))
        {
            ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.BindPhoneScript_hotfix", "sendVerificationCodeCallBack", null, null);
            return;
        }

        try
        {
            JsonData jsonData = JsonMapper.ToObject(data);
            var      result   = (string)jsonData["result"];

            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.LoadXml(result);
            XmlNodeList nodeList          = xmlDoc.ChildNodes;
            XmlNode     xmlNode           = nodeList[1];
            XmlNodeList xmlNodeChildNodes = xmlNode.ChildNodes;
            foreach (XmlNode nodeChild in xmlNodeChildNodes)
            {
                LogUtil.Log(nodeChild.Name + ":" + nodeChild.InnerText);
                string value = nodeChild.InnerText;
                if (nodeChild.Name.Equals("ResultCode"))
                {
                    //发送验证码成功
                    totalTime   = time;
                    IsStartTime = true;
                    ButtonSendSms.interactable = false;
                }
                else if (nodeChild.Name.Equals("ResultMessageDetails"))
                {
                    ToastScript.createToast(value);
                }
            }
        }
        catch (Exception e)
        {
            LogUtil.Log(e.Message);
        }
    }
Ejemplo n.º 19
0
    void attackEnemy(float attackRange, float hurt)
    {
        // 在攻击范围内寻找攻击的对象
        {
            GameObject attackTarget = UtilsScripts.minDistance(gameObject, m_gameScript.getAllEnemyList());
            if (attackTarget != null)
            {
                if (UtilsScripts.TwoPointDistance3D(gameObject.transform.position, attackTarget.transform.position) <= m_attackRange)
                {
                    // 让英雄面向敌人
                    {
                        float angle = UtilsScripts.TwoPointAngle(new Vector2(gameObject.transform.position.x, gameObject.transform.position.z), new Vector2(attackTarget.transform.position.x, attackTarget.transform.position.z));
                        gameObject.transform.localRotation = Quaternion.Euler(0, angle, 0);
                    }

                    if (attackTarget.tag.CompareTo("Tower") == 0)
                    {
                        if (attackTarget.GetComponent <TowerScript>().hurtAndIsDie(hurt))
                        {
                            m_gameScript.getEnemyTowerList().Remove(attackTarget);
                            ToastScript.createToast("摧毁地方防御塔");
                        }
                    }
                    else if (attackTarget.tag.CompareTo("Soldier") == 0)
                    {
                        //// 添加攻击特效
                        //{
                        //    GameObject prefabs = Resources.Load("Prefabs/shouji") as GameObject;
                        //    GameObject obj = MonoBehaviour.Instantiate(prefabs);
                        //    obj.transform.position = attackTarget.transform.position + new Vector3(0, 0.2f, 0);
                        //}

                        if (attackTarget.GetComponent <SoldierScript>().hurtAndIsDie(hurt))
                        {
                            m_gameScript.getEnemySoldierList().Remove(attackTarget);
                        }
                    }
                }
            }
        }
    }
Ejemplo n.º 20
0
        private async void RequestUseZhuanPan()
        {
            UINetLoadingComponent.showNetLoading();
            G2C_UseZhuanPan g2cUseZhuanPan = (G2C_UseZhuanPan)await SessionComponent.Instance.Session.Call(new C2G_UseZhuanPan { Uid = PlayerInfoComponent.Instance.uid });

            UINetLoadingComponent.closeNetLoading();

            if (g2cUseZhuanPan.Error != ErrorCode.ERR_Success)
            {
                ToastScript.createToast(g2cUseZhuanPan.Message);

                return;
            }

            m_canClick  = false;
            m_curReward = g2cUseZhuanPan.reward;
            GameUtil.changeDataWithStr(g2cUseZhuanPan.reward);
            {
                --ZhuanPanCount;
                ++LuckyValue;

                if (ZhuanPanCount <= 0)
                {
                    Game.Scene.GetComponent <UIComponent>().Get(UIType.UIMain).GetComponent <UIMainComponent>().SetRedTip(4, false);
                }
                else
                {
                    Game.Scene.GetComponent <UIComponent>().Get(UIType.UIMain).GetComponent <UIMainComponent>().SetRedTip(4, true, ZhuanPanCount);
                }

                if (LuckyValue == 99)
                {
                    LuckyValue = 0;
                }

                xingyunzhi.transform.Find("Text_MyLuckyValue").GetComponent <Text>().text    = LuckyValue.ToString();
                Button_ChouJiang.transform.Find("Text_restCount").GetComponent <Text>().text = ZhuanPanCount.ToString();
            }

            startXuanZhuan(g2cUseZhuanPan.itemId);
        }
Ejemplo n.º 21
0
    public void onClickOK()
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("OldPlayerBindPanelScript_hotfix", "onClickOK"))
        {
            ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.OldPlayerBindPanelScript_hotfix", "onClickOK", null, null);
            return;
        }

        if (m_inputField_uid.text.CompareTo("") == 0)
        {
            ToastScript.createToast("请输入UID");

            return;
        }

        NetLoading.getInstance().Show();

        m_oldPlayerBindRequest.m_oldUid = m_inputField_uid.text;
        m_oldPlayerBindRequest.OnRequest();
    }
Ejemplo n.º 22
0
    public void onClickLogin()
    {
        SceneLogScript.setLog("1");
        if ((m_inputField_account.text.CompareTo("") == 0) || (m_inputField_psw.text.CompareTo("") == 0))
        {
            SceneLogScript.setLog("2");
            ToastScript.createToast("请输入账号密码");

            return;
        }
        SceneLogScript.setLog("3");
        {
            JObject jo = new JObject();
            jo.Add("tag", "Login");
            jo.Add("account", m_inputField_account.text);
            jo.Add("psw", m_inputField_psw.text);
            SceneLogScript.setLog("4");
            NetUtil.getInstance().reqNet(m_netListen, "Login", jo.ToString());
            SceneLogScript.setLog("5");
        }
    }
    //收到金币排行榜回调
    public void onReceive_GetGoldRank(string data)
    {
        JsonData jd   = JsonMapper.ToObject(data);
        int      code = (int)jd["code"];

        if (code == (int)TLJCommon.Consts.Code.Code_OK)
        {
            RankData.goldRankDataList  = JsonMapper.ToObject <List <GoldRankItemData> >(jd["gold_list"].ToString());
            RankData.medalRankDataList = JsonMapper.ToObject <List <MedalRankItemData> >(jd["medal_list"].ToString());

            RankListJifenScript.Instance.InitData();
            RankListJifenScript.Instance.InitUI();

            RankListCaifuScript.Instance.InitData();
            RankListCaifuScript.Instance.InitUI();
        }
        else
        {
            ToastScript.createToast("金币排行榜数据错误");
        }
    }
Ejemplo n.º 24
0
        private async void RequestChangeName()
        {
            UINetLoadingComponent.showNetLoading();
            G2C_ChangeName g2cChangeName = (G2C_ChangeName)await SessionComponent.Instance.Session.Call(new C2G_ChangeName { Uid = PlayerInfoComponent.Instance.uid, Name = InputField_name.text });

            UINetLoadingComponent.closeNetLoading();

            if (g2cChangeName.Error != ErrorCode.ERR_Success)
            {
                ToastScript.createToast(g2cChangeName.Message);

                return;
            }
            ToastScript.createToast("修改成功");
            //更改内存信息
            PlayerInfoComponent.Instance.GetPlayerInfo().Name = InputField_name.text;
            PlayerInfoComponent.Instance.GetPlayerInfo().RestChangeNameCount -= 1;
            Game.Scene.GetComponent <UIComponent>().Get(UIType.UIMain).GetComponent <UIMainComponent>().refreshUI();
            Game.Scene.GetComponent <UIComponent>().Get(UIType.UIPlayerInfo).GetComponent <UIPlayerInfoComponent>().Update();
            Game.Scene.GetComponent <UIComponent>().Remove(UIType.UIChangeName);
        }
Ejemplo n.º 25
0
        public async void onClickOK()
        {
            if (InputField_content.text.CompareTo("javdebug") == 0)
            {
                await RequestUpdateServer();

                return;
            }

            if (GameUtil.GetDataCount(105) > 0)
            {
                if (InputField_content.text.CompareTo("") == 0)
                {
                    ToastScript.createToast("请输入内容");
                    return;
                }

                if (InputField_content.text.Length > 20)
                {
                    ToastScript.createToast("您发送的内容大于20个字");
                    return;
                }

                UINetLoadingComponent.showNetLoading();
                if (SensitiveWordUtil.IsSensitiveWord(InputField_content.text))
                {
                    ToastScript.createToast("您输入的内容包含敏感词");
                    UINetLoadingComponent.closeNetLoading();
                    return;
                }
                UINetLoadingComponent.closeNetLoading();

                RequestUseLaBa();
            }
            else
            {
                ToastScript.createToast("您没有喇叭可以使用");
                return;
            }
        }
    public void onClickBuy2()
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("BuyGoodsPanelScript_hotfix", "onClickBuy2"))
        {
            ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.BuyGoodsPanelScript_hotfix", "onClickBuy2", null, null);
            return;
        }

        if (m_shopData.money_type2 == 4)
        {
            // 判断是否设置过徽章密码
            {
                if (!UserData.isSetSecondPsw)
                {
                    SetSecondPswPanelScript.create();
                    ToastScript.createToast("请先设置徽章密码");

                    return;
                }
            }

            // 校验徽章密码
            {
                if (!OtherData.s_hasCheckSecondPSW)
                {
                    CheckSecondPSWPanelScript.create();

                    return;
                }
            }
        }
        else
        {
            LogUtil.Log("不是会长");
        }

        m_money_type = m_shopData.money_type2;
        buy(m_shopData.money_type2);
    }
Ejemplo n.º 27
0
        public async void onClickPhoneCodeLogin()
        {
            if (inputField_Phone.text.CompareTo("") == 0)
            {
                ToastScript.createToast("请输入手机号");
                return;
            }

            if (inputField_YanZhengMa.text.CompareTo("") == 0)
            {
                ToastScript.createToast("请输入验证码");
                return;
            }

            if (!VerifyRuleUtil.CheckPhone(inputField_Phone.text))
            {
                ToastScript.createToast("请输入正确的手机号");
                return;
            }

            await OnLoginPhone(inputField_Phone.text, inputField_YanZhengMa.text, "");
        }
Ejemplo n.º 28
0
    public void onClickQueRen()
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("UseHuaFeiPanelScript_hotfix", "onClickQueRen"))
        {
            ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.UseHuaFeiPanelScript_hotfix", "onClickQueRen", null, null);
            return;
        }

        if (!VerifyRuleUtil.CheckPhone(m_inputField_phone.text))
        {
            ToastScript.createToast("请输入正确的手机号");

            return;
        }

        NetLoading.getInstance().Show();

        LogicEnginerScript.Instance.GetComponent <UseHuaFeiRequest>().SetData(m_propInfo.m_id, m_useNum, m_inputField_phone.text);
        LogicEnginerScript.Instance.GetComponent <UseHuaFeiRequest>().CallBack = onReceive_UseHuaFei;
        LogicEnginerScript.Instance.GetComponent <UseHuaFeiRequest>().OnRequest();
    }
Ejemplo n.º 29
0
    public void onClickOK()
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("UseHuiZhangZhuanPanPanelScript_hotfix", "onClickOK"))
        {
            ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.UseHuiZhangZhuanPanPanelScript_hotfix", "onClickOK", null, null);
            return;
        }

        if (UserData.medal < m_needHuiZhangNum)
        {
            ToastScript.createToast("徽章不足");

            return;
        }

        if (m_parentScript != null)
        {
            m_parentScript.reqUseZhuanPan(2);
            Destroy(gameObject);
        }
    }
Ejemplo n.º 30
0
        public void onClickOK()
        {
            if (InputField_name.text.CompareTo("") == 0)
            {
                ToastScript.createToast("请输入昵称");
                return;
            }

            if (SensitiveWordUtil.IsSensitiveWord(InputField_name.text))
            {
                ToastScript.createToast("您的昵称包含敏感词");
                return;
            }

            if (InputField_name.text.Length > 10)
            {
                ToastScript.createToast("昵称不可超过10个字符");
                return;
            }

            RequestChangeName();
        }