Commit 04811962 authored by Mitchie Maluschnig's avatar Mitchie Maluschnig
Browse files

Created a main menu, player can cycle through: main menu --> Daytime -->pause -->main Menu

parent 47ef82cd
......@@ -2513,7 +2513,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!114 &1586100786
MonoBehaviour:
m_ObjectHideFlags: 0
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class MainMenu : MonoBehaviour {
public void StartGame() {
SceneManager.LoadScene("Daytime");
}
public void ExitGame() {
}
public void StartOver() {
//reset stuff
SceneManager.LoadScene("Daytime");
}
}
fileFormatVersion: 2
guid: ac0026dbe6533f94da97a88e9a209731
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
......@@ -7,7 +7,7 @@ public class PauseMenu : MonoBehaviour {
private DaytimeManager dayManager;
void Start() {
void Awake() {
dayManager = GameObject.FindWithTag("Manager").GetComponent<DaytimeManager>();
}
......@@ -18,6 +18,7 @@ public class PauseMenu : MonoBehaviour {
}
public void ExitToMainMenu() {
Time.timeScale = 1;
SceneManager.LoadScene("MainMenu");
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment