public void Shutdown() { MidiJack.MidiMaster.noteOnDelegate -= OnNoteOn; // Shutdown particles. for (int particle = 0; particle < particles.Length; ++particle) { if (particles[particle] != null) { particles[particle].Shutdown(); } } // Shutdown springs. for (int spring = 0; spring < springs.Length; ++spring) { if (springs[spring] != null && springs[spring].enabled) { springs[spring].Shutdown(); } } Ruratae.ShutdownSystem(); }
void OnDestroy() { Ruratae.ShutdownSystem(); monoData = null; }