public ActiveLoop(Loop loop, bool muted, bool activeForDayPhase, bool dontStart) { ServiceHelper.InjectServices((object) this); this.Muted = muted; this.volume = muted || !activeForDayPhase ? 0.0f : 1f; this.ActiveForDayPhase = activeForDayPhase; this.OnMuteStateChanged(); this.Loop = loop; this.nextCuePrecached = true; this.nextCue = this.SoundManager.GetCue(loop.Name, false); this.barsBeforePlay = (float) this.Loop.Delay; if (dontStart || this.Loop.Delay != 0) return; this.FirstPlay(); }
public void UpdateFromCopy(Loop other) { this.Name = other.Name; this.TriggerFrom = other.TriggerFrom; this.TriggerTo = other.TriggerTo; this.LoopTimesFrom = other.LoopTimesFrom; this.LoopTimesTo = other.LoopTimesTo; this.Duration = other.Duration; this.Delay = other.Delay; this.Night = other.Night; this.Day = other.Day; this.Dawn = other.Dawn; this.Dusk = other.Dusk; this.OneAtATime = other.OneAtATime; this.CutOffTail = other.CutOffTail; this.FractionalTime = other.FractionalTime; }