Main Menu with loading screen
This commit is contained in:
29
Assets/Scripts/GameOverUI.cs
Normal file
29
Assets/Scripts/GameOverUI.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class GameOverUI : MonoBehaviour
|
||||
{
|
||||
public GameObject panel;
|
||||
public static GameOverUI instance;
|
||||
|
||||
void Awake(){
|
||||
instance=this;
|
||||
}
|
||||
public static void Activate(){
|
||||
instance.activate();
|
||||
}
|
||||
|
||||
void activate(){
|
||||
panel.SetActive(true);
|
||||
}
|
||||
|
||||
|
||||
public void OnMenu(){
|
||||
LoadingScreen.LoadLevel("MainMenu");
|
||||
}
|
||||
|
||||
public void Restart(){
|
||||
LoadingScreen.LoadLevel("Game");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user