Added Car Alarm Super Surprise
This commit is contained in:
parent
8dfbd22a9e
commit
f737955a88
10 changed files with 1240 additions and 304 deletions
35
Assets/Scripts/MainMenuController.cs
Normal file
35
Assets/Scripts/MainMenuController.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using UnityEngine;
|
||||
|
||||
public class MainMenuController : MonoBehaviour
|
||||
{
|
||||
public GameObject startMenuUI;
|
||||
public GameObject gameUI;
|
||||
|
||||
void Start()
|
||||
{
|
||||
Time.timeScale = 0f;
|
||||
startMenuUI.SetActive(true);
|
||||
if (gameUI != null)
|
||||
gameUI.SetActive(false);
|
||||
|
||||
Cursor.lockState = CursorLockMode.None;
|
||||
Cursor.visible = true;
|
||||
}
|
||||
|
||||
public void StartGame()
|
||||
{
|
||||
startMenuUI.SetActive(false);
|
||||
if (gameUI != null)
|
||||
gameUI.SetActive(true);
|
||||
Time.timeScale = 1f;
|
||||
|
||||
Cursor.lockState = CursorLockMode.Locked;
|
||||
Cursor.visible = false;
|
||||
}
|
||||
|
||||
public void QuitGame()
|
||||
{
|
||||
Debug.Log("Quitting game...");
|
||||
Application.Quit();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue