1
0

Finally uploading my menu stuff

- Dustin
This commit is contained in:
Dustin Allbright 2017-03-31 13:23:22 -04:00
parent 35361ba35c
commit 8ee9db6cd8
6 changed files with 124 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5d691733bfedfa54899b27347b86db9e
timeCreated: 1463521657
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,74 @@
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
using System.Collections;
public class MenuScript : MonoBehaviour {
public Canvas quitMenu;
public Canvas creditsMenu;
public Button startText;
public Button exitText;
public Button creditText;
// Use this for initialization
void Start () {
Debug.Log("biiiiiitch");
quitMenu = quitMenu.GetComponent<Canvas>();
startText = startText.GetComponent<Button>();
exitText = exitText.GetComponent<Button>();
creditsMenu = creditsMenu.GetComponent<Canvas>();
quitMenu.enabled = false;
creditsMenu.enabled = false;
}
public void ExitPress() //Pressing the Quit Menu option
{
quitMenu.enabled = true;
startText.enabled = false;
exitText.enabled = false;
creditsMenu.enabled = false;
creditText.enabled = false;
}
public void CreditsPress() //Pressing the Credits Menu option
{
creditsMenu.enabled = true;
quitMenu.enabled = false;
startText.enabled = false;
exitText.enabled = false;
creditText.enabled = false;
}
public void NoPress()
{
quitMenu.enabled = false;
creditsMenu.enabled = false;
startText.enabled = true;
exitText.enabled = true;
creditText.enabled = true;
}
public void StartLevel()
{
SceneManager.LoadScene(1);
Debug.Log("bitch");
}
public void ExitGame()
{
Application.Quit();
}
// Update is called once per frame
void Update () {
}
}

View File

@ -0,0 +1,42 @@
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
using System.Collections;
public class PauseMenu : MonoBehaviour {
public string mainMenu;
public bool isPaused;
public GameObject pauseMenuCanvas;
// Update is called once per frame
void Update () {
if (isPaused)
{
pauseMenuCanvas.SetActive(true); //if this is true, then the pause menu will show up
Time.timeScale = 0f;
}
else
{
pauseMenuCanvas.SetActive(false);
Time.timeScale = 1f;
}
if (Input.GetKeyDown(KeyCode.Escape))
isPaused = !isPaused;
}
public void Resume()
{
isPaused = false;
}
public void Quit()
{
SceneManager.LoadScene(0);
}
}

BIN
Assets/Titles/Menu.anim Normal file

Binary file not shown.