예제 #1
0
        public void Awake(Transform parent)
        {
            var resCpt     = ETModel.Game.Scene.GetComponent <ResourcesComponent>();
            var gameObject = resCpt.GetAsset(UIType.UserCenterWin.StringToAB(), UIType.UpgradePanel);

            panelGo = (GameObject)UnityEngine.Object.Instantiate(gameObject, parent);
            Rc      = panelGo.GetComponent <ReferenceCollector>();

            _panelTweener = panelGo.transform.DOScale(Vector3.one, 0.3f).Pause().SetEase(Ease.OutBack)
                            .SetAutoKill(false);

            _captchaCpt = AddComponent <RegisterCaptchaCpt, ReferenceCollector>(Rc);

            _accountInput = Rc.GetComponent <InputField>("AccountInput");
            _accountInput.onEndEdit.AddListener(OnEndEditAccountInputField);

            _passwordInput = Rc.GetComponent <InputField>("PasswordInput");
            _passwordInput.onEndEdit.AddListener(OnEndEditPasswordInputField);

            _captchaInput = Rc.GetComponent <InputField>("CaptchaInput");
            _captchaInput.onEndEdit.AddListener(OnEndEditCaptchaInputField);

            _accountTipsText  = Rc.GetComponent <Text>("AccountTipsText");
            _passwordTipsText = Rc.GetComponent <Text>("PasswordTipsText");
            _captchaTipsText  = Rc.GetComponent <Text>("CaptchaTipsText");

            Rc.GetComponent <Button>("CloseBtn").onClick.AddListener(OnCloseMask);
            Rc.GetComponent <Button>("GetVerifiCodeButton").onClick.AddListener(OnVerifiCode);
        }
예제 #2
0
        public void Awake(GameObject a)
        {
            panelGo = a;
            //            ResourcesComponent resourcesComponent = ETModel.Game.Scene.GetComponent<ResourcesComponent>();
            //            resourcesComponent.LoadBundle(UIType.Register.StringToAB());
            //            GameObject bundleGameObject = (GameObject)resourcesComponent.GetAsset(UIType.Register.StringToAB(), UIType.Register);
            //            panelGo = UnityEngine.Object.Instantiate(bundleGameObject, Parent.Parent.GameObject.transform);

            ReferenceCollector = panelGo.GetComponent <ReferenceCollector>();

            _captchaCpt = AddComponent <RegisterCaptchaCpt, ReferenceCollector>(ReferenceCollector);

            accoutIF = ReferenceCollector.GetComponent <InputField>("accountIF");
            accoutIF.onEndEdit.AddListener(OnEndEditAccountInputField);

            passIF = ReferenceCollector.GetComponent <InputField>("passwordIF");
            passIF.onEndEdit.AddListener(OnEndEditPasswordInputField);

            repeatIF = ReferenceCollector.GetComponent <InputField>("repeatIF");
            repeatIF.onEndEdit.AddListener(OnEndEditCaptchaInputField);

            _accountTipsText  = ReferenceCollector.GetComponent <Text>("TipsTxt");
            _passwordTipsText = ReferenceCollector.GetComponent <Text>("TipsTxt2");
            _captchaTipsText  = ReferenceCollector.GetComponent <Text>("TipsTxt3");

            var registerButton = ReferenceCollector.GetComponent <Button>("RegisterButton");

            registerButton.onClick.AddListener(OnRegisterButton);

            var GetVerifiCodeButton = ReferenceCollector.GetComponent <Button>("GetVerifiCodeButton");

            GetVerifiCodeButton.onClick.AddListener(OnGetVerifiCodeButton);

            var backButton = ReferenceCollector.GetComponent <Button>("BackButton");

            backButton.onClick.AddListener(OnBackButton);
        }