using System; namespace SpellBoundAR.MusicalInstruments { public static class MusicalInstrumentsManager { public static event Action OnSongChanged; public static event Action OnColorsChanged; public static event Action OnKeyboardChanged; public static event Action OnParticleSystemsChanged; private static Song _song = null; private static bool _colors = false; private static bool _keyboard = false; private static bool _particleSystems = true; public static Song Song { get => _song; set { if (_song == value) return; _song = value; if (_song) _song.TimesSelected++; OnSongChanged?.Invoke(); } } public static bool Colors { get => _colors; set { if (_colors == value) return; _colors = value; OnColorsChanged?.Invoke(); } } public static bool Keyboard { get => _keyboard; set { if (_keyboard == value) return; _keyboard = value; OnKeyboardChanged?.Invoke(); } } public static bool ParticleSystems { get => _particleSystems; set { if (_particleSystems == value) return; _particleSystems = value; OnParticleSystemsChanged?.Invoke(); } } } }