private void PurgeManagers() { levelManager = null; playerManager = null; energyPizza = null; healthUI = null; itemInfo = null; invUI = null; messageManager = null; }
private void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } img = GetComponent <Image>(); }
private void CompileManagers() { levelManager = LevelManager.instance; playerManager = PlayerManager.instance; energyPizza = EnergyPizza.instance; GameObject go = GameObject.FindWithTag("PlayerHealth"); if (go != null) { healthUI = go.GetComponent <HealthUI>(); } itemInfo = ItemInfo.instance; invUI = InventoryUI.instance; messageManager = MessageManager.instance; }