Start scene & menu + Pause menu
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class PauseMenu : MonoBehaviour
|
||||
{
|
||||
public void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Escape) && transform.parent.gameObject.activeSelf)
|
||||
{
|
||||
Time.timeScale = 1f;
|
||||
transform.parent.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
public void Resume()
|
||||
{
|
||||
Time.timeScale = 1f;
|
||||
transform.parent.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
public void Quit()
|
||||
{
|
||||
SceneManager.LoadScene("Main", LoadSceneMode.Single);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f974a49959981694f9c4c1228edb3967
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fb8650f9d50552040b356aa1a9667894
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user