private void DestroySingletons() { TNT.DestroySingleton(); GameTimer.DestroySingleton(); Keypad.DestroySingleton(); KeypadPuzzle.DestroySingleton(); GameTimer.DestroySingleton(); Hints.DestroySingleton(); TextManager.DestroySingleton(); CommandConsole.DestroySingleton(); ThoughtsManager.DestroySingleton(); }
private void SpawnThought() { if (CurrentThoughtID == -1) { Debug.LogError("Error : Thought spawner doesn't know what to spawn!!"); } else if (CurrentThoughtID >= RelatedThoughts.Length) { Debug.LogError("Error : Spawned thought out of bounds, caused by caller : " + GetCallerName()); } else { ThoughtsManager.FireThought(RelatedThoughts[CurrentThoughtID]); } }
protected void DespawnThought() { //No need to despawn a thought if there's no active thought. if (CurrentThoughtID != -1) { if (CurrentThoughtID >= RelatedThoughts.Length) { Debug.LogError("Error : Despawned thought out of bounds, caused by caller : " + GetCallerName()); } else { ThoughtsManager.DeleteThought(RelatedThoughts[CurrentThoughtID]); } } }
private void OnEnable() { Instance = this; OnThoughtSpawned += UpdateThought; OnThoughtDespawned += UpdateThought; }
public static void DestroySingleton() { Instance = null; _instance = null; }
private void Awake() { _instance = this; thoughtsColor = thoughtsText.color; }
private void Start() { thoughtsManager = ThoughtsManager.Instance; }