feat: Player
This commit is contained in:
33
Assets/_Content/Scripts/UI/GameOverView.cs
Normal file
33
Assets/_Content/Scripts/UI/GameOverView.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace Arena.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// Game over screen. Its Restart button reloads the scene.
|
||||
/// </summary>
|
||||
public class GameOverView : MonoBehaviour
|
||||
{
|
||||
#region Public Methods
|
||||
|
||||
public void Show()
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
public void Hide()
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the Restart button (OnClick in the Inspector).
|
||||
/// </summary>
|
||||
public void Restart()
|
||||
{
|
||||
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user