Ejemplo n.º 1
0
        public static void GetNoticeData(string result)
        {
            NoticelDataScript.getInstance().initJson(result);
            Activity.noticeDatas.Clear();
            foreach (var noticeData in NoticelDataScript.getInstance().getNoticeDataList())
            {
                if (noticeData.type == 1)
                {
                    Activity.noticeDatas.Add(noticeData);
                }
            }

            // 更新的部分
            {
                if (ShieldWeChat.isShield(OtherData.s_channelName))
                {
                    for (int i = (Activity.noticeDatas.Count - 1); i >= 0; i--)
                    {
                        if (Activity.noticeDatas[i].title.CompareTo("实名认证") == 0)
                        {
                            Activity.noticeDatas.RemoveAt(i);
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public static void GetActivityData(string result)
        {
            JsonData jsonData = JsonMapper.ToObject(result);

            Activity.activityDatas = JsonMapper.ToObject <List <Activity.ActivityData> >(jsonData["activityDatas"].ToString());

            // 更新的部分
            {
                if (ShieldWeChat.isShield(OtherData.s_channelName))
                {
                    for (int i = (Activity.activityDatas.Count - 1); i >= 0; i--)
                    {
                        if (Activity.activityDatas[i].Title.CompareTo("关注微信公众号") == 0)
                        {
                            Activity.activityDatas.RemoveAt(i);
                        }
                    }
                }

                if (ShieldShare.isShield(OtherData.s_channelName))
                {
                    for (int i = (Activity.activityDatas.Count - 1); i >= 0; i--)
                    {
                        if (Activity.activityDatas[i].Title.CompareTo("大礼来袭") == 0)
                        {
                            Activity.activityDatas.RemoveAt(i);
                        }
                    }
                }
            }

            OtherData.s_activity.BtnActivity.onClick.Invoke();
        }
Ejemplo n.º 3
0
        public static string getOneTips()
        {
            string str = "";
            {
                int i = RandomUtil.getRandom(1, 3);
                if (i == 1)
                {
                    str = "弹框界面点击屏幕空白处返回";
                }
                else if (i == 2)
                {
                    str = "关注微信公众号:“星焱娱乐”,即送丰厚大礼噢~";

                    if (ShieldWeChat.isShield(OtherData.s_channelName))
                    {
                        str = "欢迎来到疯狂升级 点击喇叭可进行全服喊话哦~~";
                    }
                }
                else if (i == 3)
                {
                    str = "每日19:00、20:00、21:00、22:00整点,普通场(经典、抄底)有话费碎片掉落活动!";
                }

                if (OtherData_hotfix.getIsIosCheck())
                {
                    str = "弹框界面点击屏幕空白处返回";
                }

                return(str);
            }
        }
        public static void Start()
        {
            TurntablePanelScript script = OtherData.s_turntablePanelScript;

            script.m_ListViewScript = script.m_listView.GetComponent <ListViewScript>();

            script.m_button_free.transform.Find("Text").GetComponent <Text>().text     = UserData.myTurntableData.freeCount.ToString();
            script.m_button_huizhang.transform.Find("Text").GetComponent <Text>().text = UserData.myTurntableData.huizhangCount.ToString();

            script.m_text_myLuckyValue.text = UserData.myTurntableData.luckyValue.ToString();

            // 获取转盘数据
            {
                NetLoading.getInstance().Show();

                LogicEnginerScript.Instance.GetComponent <GetTurntableRequest>().CallBack = script.onReceive_GetTurntable;
                LogicEnginerScript.Instance.GetComponent <GetTurntableRequest>().OnRequest();
            }

            // 更新的部分
            {
                if (ShieldWeChat.isShield(OtherData.s_channelName))
                {
                    script.gameObject.transform.Find("Image_bg/Down/Image_weixintishi").localScale = Vector3.zero;
                }

                GameObject LeftObj = script.gameObject.transform.Find("Image_bg/Left").gameObject;

                LeftObj.transform.Find("Text_myLuckyValue").localPosition = new Vector3(6, 42.23f, 0);

                LeftObj.transform.Find("Text_tip").localPosition = new Vector3(-173.61f, -24, 0);
                LeftObj.transform.Find("Text_tip").GetComponent <RectTransform>().sizeDelta = new Vector2(361.93f, 66.36f);
                LeftObj.transform.Find("Text_tip").GetComponent <Text>().text = "抽奖增加幸运值,当值满         必得";

                LeftObj.transform.Find("Text_luckyMaxValue").localPosition = new Vector3(-74.4f, -24.7f, 0);

                LeftObj.transform.Find("Image_huafei10").localPosition = new Vector3(17, -23.4f, 0);
            }
        }
        public static void Start()
        {
            MedalDuiHuanPanelScript script = OtherData.s_medalDuiHuanPanelScript;

            script.m_listView_duihuanshangpin = script.m_obj_duihuanshangpin.GetComponent <ListViewScript>();
            script.m_listView_duihuanjilu     = script.m_obj_duihuanjilu.GetComponent <ListViewScript>();

            script.m_text_myMedalNum.text = UserData.medal.ToString();

            NetLoading.getInstance().Show();

            LogicEnginerScript.Instance.GetComponent <GetMedalDuiHuanRewardRequest>().CallBack = script.onCallBackGetMedalDuiHuanReward;
            LogicEnginerScript.Instance.GetComponent <GetMedalDuiHuanRewardRequest>().OnRequest();

            // 更新的部分
            {
                if (ShieldWeChat.isShield(OtherData.s_channelName))
                {
                    script.gameObject.transform.Find("Image_bg/Image_down/Text_tip").localScale = Vector3.zero;
                }
            }
        }
Ejemplo n.º 6
0
        // Use this for initialization
        public static void Start()
        {
            MedalExplainPanelScript script = OtherData.s_medalExplainPanelScript;

            if (UserData.isSetSecondPsw)
            {
                CommonUtil.setImageSprite(script.m_button_setSecondPsw.transform.Find("Image").GetComponent <Image>(), "Sprites/MedalExplain/anniu_zi_ysz");
                script.m_button_setSecondPsw.transform.Find("Image").GetComponent <Image>().SetNativeSize();
                GameObject.Destroy(script.m_button_setSecondPsw.GetComponent <Button>());
            }
            else
            {
                CommonUtil.setImageSprite(script.m_button_setSecondPsw.transform.Find("Image").GetComponent <Image>(), "Sprites/MedalExplain/anniu_zi_szmm");
                script.m_button_setSecondPsw.transform.Find("Image").GetComponent <Image>().SetNativeSize();
            }

            // 更新的部分
            if (ShieldWeChat.isShield(OtherData.s_channelName))
            {
                script.transform.Find("Bg").Find("Text (2)").GetComponent <Text>().text = "用途:可用于商城道具兑换";
                script.transform.Find("Bg").Find("Text (3)").GetComponent <Text>().text = "徽章密码:用于安全校验";
            }
        }
Ejemplo n.º 7
0
        public static void Start()
        {
            // 新增的
            {
                if (ShieldShare.isShield(OtherData.s_channelName))
                {
                    OtherData.s_mainScript.gameObject.transform.Find("ButtonList/Share").localScale = Vector3.zero;
                }

                if (ShieldWeChat.isShield(OtherData.s_channelName))
                {
                    // 主界面客服按钮
                    OtherData.s_mainScript.gameObject.transform.Find("ButtonList/Kefu").localScale = Vector3.zero;
                }

                // ios审核
                if (OtherData_hotfix.getIsIosCheck())
                {
                    // 转盘
                    OtherData.s_mainScript.gameObject.transform.Find("ButtonList/Button_zhuanpan").localScale = Vector3.zero;

                    // 签到
                    OtherData.s_mainScript.gameObject.transform.Find("ButtonList/Sign").localScale = Vector3.zero;

                    // 徽章兑换
                    OtherData.s_mainScript.gameObject.transform.Find("UserInfo/Medal/Button_medal_duihuan").localScale = Vector3.zero;

                    // 推广有礼
                    OtherData.s_mainScript.gameObject.transform.Find("ButtonList/TuiGuangYouLi").localScale = Vector3.zero;

                    // 活动
                    OtherData.s_mainScript.gameObject.transform.Find("ButtonList/Notice").localScale = Vector3.zero;
                }
            }

            // 禁止多点触摸
            Input.multiTouchEnabled = false;

            ToastScript.clear();

            // 安卓回调
            AndroidCallBack.s_onPauseCallBack  = OtherData.s_mainScript.onPauseCallBack;
            AndroidCallBack.s_onResumeCallBack = OtherData.s_mainScript.onResumeCallBack;

            AudioScript.getAudioScript().stopMusic();

            OtherData.s_mainScript.startBgm();

            // 逻辑服务器
            {
                if (OtherData.s_mainScript.getLogicEnginerObj() == null)
                {
                    OtherData.s_mainScript.setLogicEnginerObj(LogicEnginerScript.create());
                    LogicEnginerScript.Instance.setOnLogicService_Connect(OtherData.s_mainScript.onSocketConnect_Logic);
                    LogicEnginerScript.Instance.setOnLogicService_Close(OtherData.s_mainScript.onSocketClose_Logic);
                    LogicEnginerScript.Instance.GetComponent <MainRequest>().CallBack = OtherData.s_mainScript.onReceive_Main;
                }
                else
                {
                    LogicEnginerScript.Instance.setOnLogicService_Connect(OtherData.s_mainScript.onSocketConnect_Logic);
                    LogicEnginerScript.Instance.setOnLogicService_Close(OtherData.s_mainScript.onSocketClose_Logic);

                    LogicEnginerScript.Instance.GetComponent <MainRequest>().CallBack = OtherData.s_mainScript.onReceive_Main;

                    if (LogicEnginerScript.Instance.isConnecion())
                    {
                        NetLoading.getInstance().Show();

                        LogicEnginerScript.Instance.GetComponent <GetUserInfoRequest>().OnRequest();
                        LogicEnginerScript.Instance.GetComponent <GetRankRequest>().OnRequest();
                        LogicEnginerScript.Instance.GetComponent <GetSignRecordRequest>().OnRequest();
                        LogicEnginerScript.Instance.GetComponent <GetUserBagRequest>().CallBack = onReceive_GetUserBag;
                        LogicEnginerScript.Instance.GetComponent <GetUserBagRequest>().OnRequest();
                        LogicEnginerScript.Instance.GetComponent <GetEmailRequest>().OnRequest();
                        LogicEnginerScript.Instance.GetComponent <GetNoticeRequest>().OnRequest();
                    }
                    else
                    {
                        NetErrorPanelScript.getInstance().Show();
                        NetErrorPanelScript.getInstance().setOnClickButton(OtherData.s_mainScript.onClickChongLian_Logic);
                        NetErrorPanelScript.getInstance().setContentText("与服务器断开连接,请重新连接");
                    }
                }
            }

            // 游戏打牌服务器
            {
                if (OtherData.s_mainScript.getPlayEnginerObj() == null)
                {
                    OtherData.s_mainScript.setPlayEnginerObj(PlayServiceSocket.create());

                    PlayServiceSocket.s_instance.setOnPlayService_Connect(OtherData.s_mainScript.onSocketConnect_Play);
                    PlayServiceSocket.s_instance.setOnPlayService_Receive(OtherData.s_mainScript.onSocketReceive_Play);
                    PlayServiceSocket.s_instance.setOnPlayService_Close(OtherData.s_mainScript.onSocketClose_Play);

                    PlayServiceSocket.s_instance.startConnect();
                }
                else
                {
                    PlayServiceSocket.s_instance.setOnPlayService_Connect(OtherData.s_mainScript.onSocketConnect_Play);
                    PlayServiceSocket.s_instance.setOnPlayService_Receive(OtherData.s_mainScript.onSocketReceive_Play);
                    PlayServiceSocket.s_instance.setOnPlayService_Close(OtherData.s_mainScript.onSocketClose_Play);
                }
            }

            OtherData.s_mainScript.m_laBaScript = OtherData.s_mainScript.m_laba.GetComponent <LaBaScript>();
        }