Меню игрока и появление его при смерти
This commit is contained in:
18
Assets/MenuScript.cs
Normal file
18
Assets/MenuScript.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class MenuScript : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
public void RestartGame()
|
||||
{
|
||||
SceneManager.LoadSceneAsync(SceneManager.GetActiveScene().name);
|
||||
}
|
||||
|
||||
public void ExitGame()
|
||||
{
|
||||
Application.Quit();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user