init
This commit is contained in:
31
Assets/Scripts/GameUI.cs
Normal file
31
Assets/Scripts/GameUI.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class GameUI : MonoBehaviour
|
||||
{
|
||||
public static GameUI instance;
|
||||
|
||||
|
||||
[SerializeField]private GameObject deathPanel;
|
||||
void Awake(){
|
||||
instance =this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void ShowDeath(){
|
||||
instance.showDeath();
|
||||
}
|
||||
|
||||
void showDeath(){
|
||||
deathPanel.SetActive(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void Restart(){
|
||||
SceneManager.LoadScene(0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user