Code cleanup.
This commit is contained in:
@@ -1,12 +1,24 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cryville.Crtr.UI {
|
||||
internal class Master : MonoBehaviour {
|
||||
static Master s_instance;
|
||||
public static Master Instance { get { return s_instance; } }
|
||||
|
||||
#pragma warning disable IDE0044
|
||||
[SerializeField]
|
||||
private GameObject m_menu;
|
||||
#pragma warning restore IDE0044
|
||||
|
||||
void Awake() {
|
||||
if (s_instance != null) {
|
||||
Destroy(gameObject);
|
||||
throw new InvalidOperationException("Attempted to initialize a singleton twice.");
|
||||
}
|
||||
s_instance = this;
|
||||
}
|
||||
|
||||
internal void ShowMenu() { m_menu.SetActive(true); }
|
||||
internal void HideMenu() { m_menu.SetActive(false); }
|
||||
|
||||
|
Reference in New Issue
Block a user