Ejemplo n.º 1
0
        public override void init()
        {
            base.getGameObjectByPath("login").SetActive(true);
            base.getGameObjectByPath("loading").SetActive(true);
            login.instance = this;
            this.txtServer = base.getComponentByPath <Text>("login/server/Text");
            this.bt        = base.getComponentByPath <Button>("login/bt");
            this.btChoose  = base.getComponentByPath <Button>("login/server");
            this.waitTxt   = base.getComponentByPath <Text>("loading/txt_wait");
            this.waitTxt.gameObject.SetActive(false);
            this.imageBg = base.getComponentByPath <Image>("mask");
            this.imageBg.gameObject.SetActive(false);
            this.goUpdate    = base.getGameObjectByPath("update");
            this.updateline  = this.goUpdate.transform.FindChild("line");
            this.updatTxt    = this.goUpdate.transform.FindChild("Text").GetComponent <Text>();
            this.uidTxt      = base.getComponentByPath <Text>("login/uid/txt");
            this.noticePanel = base.getGameObjectByPath("notice");
            this.noticeTxt   = this.noticePanel.transform.FindChild("str").GetComponent <Text>();
            this.titleTxt    = this.noticePanel.transform.FindChild("title").GetComponent <Text>();
            this.btn_look    = base.getGameObjectByPath("btn_look");
            this.btn_look.GetComponent <Button>().onClick.AddListener(new UnityAction(this.onOpenNotice));
            this.noticePanel.transform.FindChild("close").GetComponent <Button>().onClick.AddListener(new UnityAction(this.onCloseNotice));
            GameObject gameObjectByPath = base.getGameObjectByPath("msg");

            gameObjectByPath.SetActive(false);
            this.msg = new LoginMsgBox(gameObjectByPath.transform);
            this.bt.onClick.AddListener(new UnityAction(this.onEnterClick));
            this.btChoose.onClick.AddListener(new UnityAction(this.onChoose));
            this.loadingserver   = base.getGameObjectByPath("loading_update");
            this.bt.interactable = (this.btChoose.interactable = false);
            this.goUpdate.SetActive(false);
            GlobleSetting.initSystemSetting();
            base.getGameObjectByPath("fg").SetActive(false);
            this.initScence();
            bool flag = Globle.QSMY_Platform_Index == ENUM_QSMY_PLATFORM.QSPF_LINKSDK;

            if (flag)
            {
                AndroidPlotformSDK.LOGIN_ACTION = new Action <Variant>(this.platform_Login);
                IOSPlatformSDK.LOGIN_ACTION     = new Action <Variant>(this.platform_Login);
                AnyPlotformSDK.Call_Cmd("login", null, null, true);
            }
            else
            {
                this.changeState(-1, 0);
            }
        }
Ejemplo n.º 2
0
        public override void init()
        {
            getGameObjectByPath("login").SetActive(true);
            getGameObjectByPath("loading").SetActive(true);


            instance       = this;
            txtServer      = getComponentByPath <Text>("login/server/Text");
            txtServer.text = "";
            bt             = getComponentByPath <Button>("login/bt");
            btChoose       = getComponentByPath <Button>("login/server");

            waitTxt = getComponentByPath <Text>("loading/txt_wait");
            waitTxt.gameObject.SetActive(false);

            imageBg = this.getComponentByPath <Image>("mask");
            imageBg.gameObject.SetActive(false);
            goUpdate   = getGameObjectByPath("update");
            updateline = goUpdate.transform.FindChild("line");
            updatTxt   = goUpdate.transform.FindChild("Text").GetComponent <Text>();
            uidTxt     = getComponentByPath <Text>("login/uid/txt");
            vetTxt     = getComponentByPath <Text>("login/ver_txt");

            noticePanel = getGameObjectByPath("notice");
            noticeTxt   = noticePanel.transform.FindChild("scroll_view/str").GetComponent <Text>();
            //titleTxt = noticePanel.transform.FindChild("title").GetComponent<Text>();
            //titleTxt = noticePanel.transform.FindChild("title").gameObject;
            btn_look = getGameObjectByPath("btn_look");
            btn_look.GetComponent <Button>().onClick.AddListener(onOpenNotice);
            noticePanel.transform.FindChild("close").GetComponent <Button>().onClick.AddListener(onCloseNotice);

            GameObject go = getGameObjectByPath("msg");

            go.SetActive(false);
            msg = new LoginMsgBox(go.transform);

            bt.onClick.AddListener(onEnterClick);
            btChoose.onClick.AddListener(onChoose);

            loadingserver = getGameObjectByPath("loading_update");

            bt.interactable = btChoose.interactable = false;
            goUpdate.SetActive(false);
            GlobleSetting.initSystemSetting();

            getGameObjectByPath("fg").SetActive(false);

            initScence();

            if (Globle.QSMY_Platform_Index == ENUM_QSMY_PLATFORM.QSPF_LINKSDK)
            {
                AndroidPlotformSDK.LOGIN_ACTION = platform_Login;
                IOSPlatformSDK.LOGIN_ACTION     = platform_Login;
                AnyPlotformSDK.Call_Cmd("login");


                ////内网链接测试
                //Globle.YR_srvlists__slurl = "http://10.1.8.76/ifacec/sdk_srvlists.php?";
                //Globle.YR_srvlists__platform = "lanandroid";
                //Globle.YR_srvlists__sign = "123";
                //Globle.YR_srvlists__platuid = "171039691";
                //LGPlatInfo.inst.loadServerList();
            }
            else
            {
                changeState(-1);
            }
        }