コード例 #1
0
    void EnterLogin()
    {
        btLogin.StopImpact(1f);

        if (!string.IsNullOrEmpty(GameManager.Setting.IsMustUpdate))
        {
            Common.MustUpdateGame();
            return;
        }

        if (!Common.IsRelease)
        {
            string testUsername = "******";
            string testPassword = "******";

#if UNITY_STANDALONE_WIN
            testUsername = "******";
#elif UNITY_ANDROID
            testUsername = "******";
#else
            testUsername = "******";
#endif
            if (Application.isEditor)
            {
                testUsername = "******";
                testPassword = "******";
            }

            if (string.IsNullOrEmpty(lableUsername.value) && string.IsNullOrEmpty(lablePassword.value))
            {
                lableUsername.value = testUsername;
                lablePassword.value = testPassword;
            }
        }

        if (string.IsNullOrEmpty(lableUsername.value))
        {
            NotificationView.ShowMessage("Tên truy cập không được phép để trống");
            return;
        }
        if (string.IsNullOrEmpty(lablePassword.value))
        {
            NotificationView.ShowMessage("Mật khẩu không được phép để trống.");
            return;
        }

        IsClickButtonLogin = true;
        GameManager.Instance.userNameLogin = lableUsername.value;
        GameManager.Instance.passwordLogin = lablePassword.value;
        GameManager.Server.DoLogin();

        if (!Common.IsRelease)
        {
            StoreGame.SaveString(StoreGame.EType.SAVE_SERVER, CServer.HOST_NAME);
        }
    }
コード例 #2
0
    void OnClickButtonForgot(GameObject go)
    {
        btSend.StopImpact(2f);

        if (!Utility.Input.IsEmail(txtEmail.value))
        {
            NotificationView.ShowMessage("Đề nghị nhập một email hợp lệ !", 3f);
            return;
        }

        _Send();
    }
コード例 #3
0
    void OnClickClose(GameObject go)
    {
        buttonClose.StopImpact(0.5f);

        NextMessage();
    }