2020-01-17 22:09:54 -05:00
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.SceneManagement;
|
2020-01-27 21:34:58 -05:00
|
|
|
using UnityEngine.EventSystems;
|
2020-02-09 22:49:06 -05:00
|
|
|
using TMPro;
|
2020-01-17 22:09:54 -05:00
|
|
|
|
2020-02-11 20:58:14 -05:00
|
|
|
[System.Serializable]
|
|
|
|
|
|
2020-01-17 22:09:54 -05:00
|
|
|
public class MainMenu : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
|
2020-01-27 21:34:58 -05:00
|
|
|
public GameObject menuFirstButton;
|
|
|
|
|
public GameObject skinsFirstButton;
|
2020-02-06 21:59:13 -05:00
|
|
|
public GameObject highscoreFirstButton;
|
|
|
|
|
public GameObject gameinfoFirstButton;
|
2020-01-27 21:34:58 -05:00
|
|
|
public GameObject optionsFirstButton;
|
|
|
|
|
public GameObject skinsBackButton;
|
2020-02-06 21:59:13 -05:00
|
|
|
public GameObject highscoreBackButton;
|
|
|
|
|
public GameObject gameinfoBackButton;
|
2020-01-27 21:34:58 -05:00
|
|
|
public GameObject optionsBackButton;
|
2020-02-09 22:49:06 -05:00
|
|
|
public TextMeshProUGUI BeanTalk;
|
2020-02-11 20:58:14 -05:00
|
|
|
public string[] phrases;
|
2020-01-27 21:34:58 -05:00
|
|
|
|
|
|
|
|
void Start()
|
|
|
|
|
{
|
|
|
|
|
EventSystem.current.SetSelectedGameObject(null);
|
|
|
|
|
EventSystem.current.SetSelectedGameObject(menuFirstButton);
|
2020-02-11 20:58:14 -05:00
|
|
|
BeanTalk.text = phrases[Random.Range(0, phrases.Length)];
|
|
|
|
|
|
2020-01-27 21:34:58 -05:00
|
|
|
}
|
|
|
|
|
|
2020-01-17 22:09:54 -05:00
|
|
|
public void PlayGame()
|
|
|
|
|
{
|
|
|
|
|
SceneManager.LoadScene("Hub World", LoadSceneMode.Single);
|
|
|
|
|
}
|
|
|
|
|
|
2020-01-27 21:34:58 -05:00
|
|
|
public void Skins()
|
|
|
|
|
{
|
|
|
|
|
EventSystem.current.SetSelectedGameObject(null);
|
|
|
|
|
EventSystem.current.SetSelectedGameObject(skinsFirstButton);
|
2020-02-10 22:21:40 -05:00
|
|
|
BeanTalk.text = "WHAT DO I DO AGAIN?";
|
2020-01-27 21:34:58 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void BackSkins()
|
|
|
|
|
{
|
|
|
|
|
EventSystem.current.SetSelectedGameObject(null);
|
|
|
|
|
EventSystem.current.SetSelectedGameObject(skinsBackButton);
|
2020-02-11 20:58:14 -05:00
|
|
|
BeanTalk.text = phrases[Random.Range(0, phrases.Length)];
|
2020-01-27 21:34:58 -05:00
|
|
|
}
|
|
|
|
|
|
2020-02-06 21:59:13 -05:00
|
|
|
public void Highscores()
|
|
|
|
|
{
|
|
|
|
|
EventSystem.current.SetSelectedGameObject(null);
|
|
|
|
|
EventSystem.current.SetSelectedGameObject(highscoreFirstButton);
|
2020-02-10 22:21:40 -05:00
|
|
|
BeanTalk.text = "GOOD JOB!";
|
2020-02-06 21:59:13 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void BackHighscores()
|
|
|
|
|
{
|
|
|
|
|
EventSystem.current.SetSelectedGameObject(null);
|
|
|
|
|
EventSystem.current.SetSelectedGameObject(highscoreBackButton);
|
2020-02-11 20:58:14 -05:00
|
|
|
BeanTalk.text = phrases[Random.Range(0, phrases.Length)];
|
2020-02-06 21:59:13 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void GameInfo()
|
|
|
|
|
{
|
|
|
|
|
EventSystem.current.SetSelectedGameObject(null);
|
|
|
|
|
EventSystem.current.SetSelectedGameObject(gameinfoFirstButton);
|
2020-02-10 22:21:40 -05:00
|
|
|
BeanTalk.text = "SO MANY BUTTONS!";
|
2020-02-06 21:59:13 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void BackGameInfo()
|
|
|
|
|
{
|
|
|
|
|
EventSystem.current.SetSelectedGameObject(null);
|
|
|
|
|
EventSystem.current.SetSelectedGameObject(gameinfoBackButton);
|
2020-02-11 20:58:14 -05:00
|
|
|
BeanTalk.text = phrases[Random.Range(0, phrases.Length)];
|
2020-02-06 21:59:13 -05:00
|
|
|
}
|
|
|
|
|
|
2020-01-27 21:34:58 -05:00
|
|
|
public void Options()
|
|
|
|
|
{
|
|
|
|
|
EventSystem.current.SetSelectedGameObject(null);
|
|
|
|
|
EventSystem.current.SetSelectedGameObject(optionsFirstButton);
|
2020-02-10 22:21:40 -05:00
|
|
|
BeanTalk.text = "LOOK AT THOSE GRAPHIX!";
|
2020-01-27 21:34:58 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void BackOptions()
|
|
|
|
|
{
|
|
|
|
|
EventSystem.current.SetSelectedGameObject(null);
|
|
|
|
|
EventSystem.current.SetSelectedGameObject(optionsBackButton);
|
2020-02-11 20:58:14 -05:00
|
|
|
BeanTalk.text = phrases[Random.Range(0, phrases.Length)];
|
2020-01-27 21:34:58 -05:00
|
|
|
}
|
|
|
|
|
|
2020-01-17 22:09:54 -05:00
|
|
|
public void QuitGame()
|
|
|
|
|
{
|
|
|
|
|
Application.Quit();
|
|
|
|
|
Debug.Log("QUIT");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|