protected void Trigger(Event evt, TriggerLoop loop, pSprite sprite, bool alwaysClearLoops) { if (alwaysClearLoops) { evt.RemoveAllLoops(TriggerGroup); } if (loop.TriggerEndTime != 0 && (AudioEngine.Time < loop.TriggerStartTime || AudioEngine.Time > loop.TriggerEndTime)) { return; } if (!alwaysClearLoops) { if (HasSpecificTriggerGroup) { evt.RemoveAllLoops(TriggerGroup); } else { evt.RemoveLoop(loop); } } loop.StartTime = AudioEngine.Time; sprite.MakeLoopStatic(loop); }