|
@ -11,13 +11,17 @@ public class Menu : MonoBehaviour { |
|
|
public GameObject musicEpic; |
|
|
public GameObject musicEpic; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private bool start = false; |
|
|
private bool start = false; |
|
|
private bool menu = true; |
|
|
private bool menu = true; |
|
|
private float goreCount = 20; |
|
|
private float goreCount = 20; |
|
|
private string music = "Traditional"; |
|
|
private string music = "Traditional"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Use this for initialization
|
|
|
// Use this for initialization
|
|
|
void Start () { |
|
|
void Start () { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Update is called once per frame
|
|
|
// Update is called once per frame
|
|
@ -38,10 +42,18 @@ public class Menu : MonoBehaviour { |
|
|
Time.timeScale = 0; |
|
|
Time.timeScale = 0; |
|
|
else |
|
|
else |
|
|
Time.timeScale = 1; |
|
|
Time.timeScale = 1; |
|
|
|
|
|
|
|
|
|
|
|
if (Input.GetKey(KeyCode.F12)) |
|
|
|
|
|
AudioListener.volume = 0.0f; |
|
|
|
|
|
if (Input.GetKey(KeyCode.F11)) |
|
|
|
|
|
AudioListener.volume = 1.0f; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void OnGUI () |
|
|
void OnGUI () |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
if (start) { |
|
|
if (start) { |
|
|
// Make a background box
|
|
|
// Make a background box
|
|
|
GUI.Box (new Rect (Screen.width / 2 - 100, Screen.height / 2 - 150, 200, 300), "Menu"); |
|
|
GUI.Box (new Rect (Screen.width / 2 - 100, Screen.height / 2 - 150, 200, 300), "Menu"); |
|
@ -105,13 +117,8 @@ public class Menu : MonoBehaviour { |
|
|
musicEpic.SetActive(false); |
|
|
musicEpic.SetActive(false); |
|
|
musicTrad.SetActive(true); |
|
|
musicTrad.SetActive(true); |
|
|
} |
|
|
} |
|
|
else if (music =="Traditional"){ |
|
|
|
|
|
music = "Epic"; |
|
|
|
|
|
musicEpic.SetActive(true); |
|
|
|
|
|
musicTrad.SetActive(false); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
GUI.Label(new Rect(Screen.width/2 +5, Screen.height/2 +55, 90, 30), "" +music); |
|
|
GUI.Label(new Rect(Screen.width/2 +5, Screen.height/2 +55, 90, 30), "" +music); |
|
|
|
|
|
|
|
|
if (GUI.Button (new Rect (Screen.width / 2-90 , Screen.height / 2 +90, 180, 30), "Exit Menu")) { |
|
|
if (GUI.Button (new Rect (Screen.width / 2-90 , Screen.height / 2 +90, 180, 30), "Exit Menu")) { |
|
|