/// <summary> /// Called when simulation is about to destroy itself, but right before it actually does it. /// </summary> protected override void OnPreDestroy() { // Notify modules of impending doom allowing them to save data. Scoring.Destroy(); Tombstone.Destroy(); Time.Destroy(); EventDirector.Destroy(); Trail.Destroy(); // Null the destroyed instances. Scoring = null; Tombstone = null; Time = null; EventDirector = null; Trail = null; TotalTurns = 0; Vehicle = null; // Destroys game simulation instance. Instance = null; }