30 lines
564 B
C#
30 lines
564 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
using UnityEngine.UI;
|
|
|
|
public class MainMenu : MonoBehaviour
|
|
{
|
|
public InputField password;
|
|
public Button loginBtn;
|
|
|
|
private void Awake()
|
|
{
|
|
loginBtn.onClick.AddListener(Login);
|
|
}
|
|
|
|
void Login()
|
|
{
|
|
if(password.text == "admin@123")
|
|
{
|
|
MPChat.isAdmin = true;
|
|
SceneManager.LoadScene("ADMIN_LOBBY");
|
|
}
|
|
else
|
|
{
|
|
password.text = "";
|
|
}
|
|
}
|
|
}
|