internal void CopyFrom(SFXData data) { Elapsed = data.Elapsed; Volume = data.Volume; Pitch = data.Pitch; Pan = data.Pan; }
internal static void Update(GameTime time) { foreach (KeyValuePair <SoundEffect, SFXData> p in looping) { SFXData data = looping[p.Key]; data.Elapsed += (float)time.ElapsedGameTime.TotalMilliseconds; if (data.Elapsed >= p.Key.Duration.TotalMilliseconds) { if (!p.Key.IsDisposed) { p.Key.Play(data.Volume, data.Pitch, data.Pan); } data.Elapsed = 0; } looping[p.Key].CopyFrom(data); } }