Example #1
0
        public void Awake()
        {
            ToastScript.clear();
            initData();

            RequestDailySignState();
        }
Example #2
0
        public void Awake()
        {
            ToastScript.clear();

            initData();

            RequestUseHuaFeiState();
        }
Example #3
0
        public void Awake()
        {
            Instance = this;
            ToastScript.clear();

            initData();

            RequestGetZhuanPanState();
        }
Example #4
0
        public async void Awake()
        {
            // 获取配置文件
            {
                string fileName = "otherConfig-" + PlatformHelper.GetVersionName() + ".json";
                await HttpReqUtil.Req(NetConfig.getInstance().getWebUrl() + "files/" + fileName, OtherConfig.getInstance().init);
            }

            ToastScript.clear();
            Instance = this;
            initData();
            CommonUtil.SetTextFont(panel_start.transform.parent.gameObject);
        }
    public void onDllGetOver()
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("LoginScript_hotfix", "onDllGetOver"))
        {
            ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.LoginScript_hotfix", "onDllGetOver", null, null);
            return;
        }

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

            // 永不息屏
            Screen.sleepTimeout = SleepTimeout.NeverSleep;

            OtherData.s_screenSize = new Vector2(Screen.width, Screen.height);

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

        ToastScript.clear();

        {
            GameUtil.hideGameObject(m_debugLog);

            // 用于打印屏幕日志
            m_debugLogScript = m_debugLog.GetComponent <DebugLogScript>();
        }

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

        Set3rdLogin();
        setLogonTypeUI();

        if (!OtherData.s_isFromSetToLogin)
        {
            m_healthTipPanel.transform.localScale = new Vector3(1, 1, 1);
            showHealth();
        }
        else
        {
            NetLoading.getInstance().Show();

            // 获取数值表
            OtherData.s_getNetEntityFile.getNetFile();
        }
    }
Example #6
0
        public void Awake()
        {
            ToastScript.clear();

            initData();
        }
Example #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>();
        }