public void Stop(float fadeOut = 0f) { DebugLog.Print("Stop all components"); for (int i = 0; i < _components.Count; i++) { Fabric.Component component = _components[i]; component.Stop(stopInstances: true, forceStop: true, ignoreFade: true, 0f); } }
public override void PlayInternal(ComponentInstance zComponentInstance, float target, float curve, bool dontPlayComponents) { if (CheckMIDI(zComponentInstance) && _components.Count != 0) { if (_selectedComponent != null) { _selectedComponent.Stop(); } base.PlayInternal(zComponentInstance, target, curve, dontPlayComponents: true); float num = 0f; if (_delayOnFirstPlay) { num = _delay + UnityEngine.Random.Range(_delayRandomization, _delayMaxRandomization); _componentInstance._instance.SetPlayScheduledAdditive(num, 0.0); } PlayRandomomponent(zComponentInstance); if (_looped && _playMode == RandomComponentPlayMode.RandomNoRepeat && _triggerMode == RandomComponentTriggerMode.Retrigger) { _retriggerTime = 0f; _retriggerTime = num; } _status = ComponentStatus.Playing; } }