Beispiel #1
0
 public void ACTION_SKIP_ACCOUNT()
 {
     ButtonHelper.Clicked();
     GameController.disableOnline    = true;
     OnlineManager.UserData.EmailID  = "*****@*****.**";
     OnlineManager.UserData.Password = "******";
     StartCoroutine(onlineManager.Login());
     AlertPanel.DismissPanel();
     ButtonHelper.ResetClick();
 }
Beispiel #2
0
    public void ACTION_LOGIN()
    {
        ButtonHelper.Clicked();
        string email    = signIn.transform.Find("email").GetComponent <InputField>().text;
        string password = signIn.transform.Find("password").GetComponent <InputField>().text;

        OnlineManager.UserData.EmailID  = email;
        OnlineManager.UserData.Password = password;
        StartCoroutine(onlineManager.Login());
    }
Beispiel #3
0
    public void ACTION_REGISTER()
    {
        ButtonHelper.Clicked();
        string name          = register.transform.Find("name").GetComponent <InputField>().text;
        string email         = register.transform.Find("email").GetComponent <InputField>().text;
        string password      = register.transform.Find("password").GetComponent <InputField>().text;
        string gamerID       = register.transform.Find("gamerID").GetComponent <InputField>().text;
        string validEmail    = FormValidation.ValidEmail(email);
        string validName     = FormValidation.ValidName(name);
        string validPassword = FormValidation.ValidPassword(password);
        string validGamerID  = FormValidation.ValidGamerID(gamerID);


        if (validName != null)
        {
            ErrorPanel.ShowError(validName);
            ButtonHelper.ResetClick();
        }

        else if (validGamerID != null)
        {
            ErrorPanel.ShowError(validGamerID);
            ButtonHelper.ResetClick();
        }

        else if (validEmail != null)
        {
            ErrorPanel.ShowError(validEmail);
            ButtonHelper.ResetClick();
        }

        else if (validPassword != null)
        {
            ErrorPanel.ShowError(validPassword);
            ButtonHelper.ResetClick();
        }

        else
        {
            OnlineManager.UserData.Name     = name;
            OnlineManager.UserData.EmailID  = email;
            OnlineManager.UserData.Password = password;
            OnlineManager.UserData.GamerID  = gamerID;
            StartCoroutine(onlineManager.Register());
        }
    }
Beispiel #4
0
 public void Exit()
 {
     ButtonHelper.Clicked();
     Application.Quit();
 }
Beispiel #5
0
 public void SHOW_LEADERBOARD()
 {
     ButtonHelper.Clicked();
     StartCoroutine(onlineManager.downloadScoreData());
     ButtonHelper.ResetClick();
 }
Beispiel #6
0
 public void ACTION_SHOW_HIGHSCORES()
 {
     ButtonHelper.Clicked();
     SwitchPage(Page.HighScore);
 }
Beispiel #7
0
 public void ACTION_SHOW_MAINMENU()
 {
     ButtonHelper.Clicked();
     SwitchPage(Page.MainMenu);
 }
Beispiel #8
0
 public void SHOW_SKIP_ACCOUNT()
 {
     ButtonHelper.Clicked();
     AlertPanel.ShowError("Skipping Account Sign In/ Sign Up Will disable High Score Tracking.\nAre You Sure you Want to Proceed ?");
     ButtonHelper.ResetClick();
 }
Beispiel #9
0
 public void ACTION_SHOW_REGISTER()
 {
     ButtonHelper.Clicked();
     SwitchPage(Page.Register);
 }
Beispiel #10
0
 public void ACTION_SHOW_LOGIN()
 {
     ButtonHelper.Clicked();
     SwitchPage(Page.SignIn);
 }