/// <summary> /// Gatekeeper function for <see cref="OnTrigger"/><br/> /// (I refuse calling that a good implementation)<br/> /// (Who the f**k did this???)<br/> /// (Use a <see cref="System.Collections.Generic.Dictionary{TKey, TValue}"/> instead) /// </summary> /// <param name="songEventData">Event to evaluate</param> private void OnSongEvent(BeatmapDataItem songEventData) { switch (songEventData) { case BasicBeatmapEventData basicBeatmapEventData when basicBeatmapEventData.subtypeIdentifier == _subtypeIdentifier && basicBeatmapEventData.value == value || anyValue: OnTrigger !.Invoke(); break; case ColorBoostBeatmapEventData colorBoostBeatmapEventData when colorBoostBeatmapEventData.boostColorsAreOn == value > 0 || anyValue: OnTrigger !.Invoke(); break; } }
private void BeatmapEventDidTrigger(BeatmapDataItem eventData) { BeatmapEventDidTriggerEvent?.Invoke(eventData); }