Ejemplo n.º 1
0
    public void ReturnFromRegistration()
    {
        HeadingText.GetComponent <TextMeshProUGUI>().text = "User Login";
        LoginButton.SetActive(true);
        LoginButtonCover.SetActive(true);
        UserLoginText.SetActive(true);
        PasswordText.SetActive(true);
        RegisterButton.SetActive(true);
        //RegisterName, RegisterPassword, RegisterLocation, RegisterAge, SubmitCoverButton, SubmitButton;
        RegisterName.SetActive(false);
        RegisterPassword.SetActive(false);
        RegisterLocation.SetActive(false);
        RegisterAge.SetActive(false);
        SubmitCoverButton.SetActive(false);
        SubmitButton.SetActive(false);
        Registering = false;

        if (netManager)
        {
            if (netManager.IsConnectedToServer())
            {
                netManager.AttemptAccountCreation(RegisterName.GetComponent <TMP_InputField>().text, RegisterPassword.GetComponent <TMP_InputField>().text);
            }
        }
    }
    // Update is called once per frame
    void Update()
    {
        if (FindingMatch)
        {
            fakeMatchmakingCount++;

            if (MusicObject)
            {
                if (MusicObject.GetComponent <AudioSource>().volume > 0)
                {
                    MusicObject.GetComponent <AudioSource>().volume -= 0.001f;
                }
            }
        }

        if (FoundMatch)
        {
            HeadingText.GetComponent <TextMeshProUGUI>().text = "Match Found, Prepare for Battle";
        }

        if (FoundMatch && fakeMatchmakingCount > 1150)
        {
            FadeoutPaneltoGame.SetActive(true);
        }
    }
 public void StartMatchmaking()
 {
     QuickPlayButton.SetActive(false);
     ProfileButton.SetActive(false);
     BackButton.SetActive(false);
     HeadingText.GetComponent <TextMeshProUGUI>().text = "Finding Match";
     FindingMatch = true;
 }
 public void CancelMatchmaking()
 {
     QuickPlayButton.SetActive(true);
     ProfileButton.SetActive(true);
     BackButton.SetActive(true);
     HeadingText.GetComponent <TextMeshProUGUI>().text = "Choose Operation";
     FindingMatch = false;
     MusicObject.GetComponent <AudioSource>().volume = 1.0f;
 }
Ejemplo n.º 5
0
 public void StartRegistration()
 {
     LoginButton.SetActive(false);
     LoginButtonCover.SetActive(false);
     UserLoginText.SetActive(false);
     PasswordText.SetActive(false);
     HeadingText.GetComponent <TextMeshProUGUI>().text = "Register New Profile";
     RegisterButton.SetActive(false);
     //RegisterName, RegisterPassword, RegisterLocation, RegisterAge, SubmitCoverButton, SubmitButton;
     RegisterName.SetActive(true);
     RegisterPassword.SetActive(true);
     RegisterLocation.SetActive(true);
     RegisterAge.SetActive(true);
     SubmitCoverButton.SetActive(true);
     Registering = true;
 }