Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
782 B
1
Indexable
Never
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;

public class RegisterManager : MonoBehaviour {
    public InputField Name, lastname, email, password, confirmpassword;
    public GameObject successPanel, failPanel;

    public void Register() {
        if (Name.text != "" && lastname.text != "" && email.text != "" 
        && password.text.Length >= 6 && password.text == confirmpassword.text) {
            successPanel.SetActive(true);
        } else {
            failPanel.SetActive(true);
        }
    }

    public void GoToMenu() {
        SceneManager.LoadScene("Menu");
    }

    public void RetryRegister() {
        failPanel.SetActive(false);
    }
}