private void CheckStop(SoundEventEmitterMessage message) { if (message == _stopAt) { foreach (var eventInstance in _eventInstances) { eventInstance.stop(FMOD.Studio.STOP_MODE.ALLOWFADEOUT); } } }
/// <summary> /// /// </summary> private void CheckPlay(SoundEventEmitterMessage message) { if (message == _playAt) { if (_stopAtReplay) { ForceStop(); } _eventInstances = this.EmitSound(_soundKey, _mandatory).ToArray(); } }
/// <summary> /// /// </summary> /// <param name="message"></param> private void DoCheck(SoundEventEmitterMessage message) { CheckPlay(message); CheckStop(message); }