public ActiveSound(SoundStyle style, Vector2 position) { Position = position; Volume = 1f; IsGlobal = false; Style = style; Play(); }
public ActiveSound(SoundStyle style) { this.Position = Vector2.get_Zero(); this.Volume = 1f; this.IsGlobal = true; this._style = style; this.Play(); }
public SlotId Play(SoundStyle style, Vector2 position) { if (Main.dedServ || style == null || !style.IsTrackable) { return((SlotId)SlotId.Invalid); } return((double)Vector2.DistanceSquared(Main.screenPosition + new Vector2((float)(Main.screenWidth / 2), (float)(Main.screenHeight / 2)), position) > 100000000.0 ? (SlotId)SlotId.Invalid : this._trackedSounds.Add(new ActiveSound(style, position))); }
public ActiveSound(SoundStyle style, Vector2 position) { this.Position = position; this.Volume = 1f; this.IsGlobal = false; this._style = style; this.Play(); }
public ActiveSound(SoundStyle style) { Position = Vector2.Zero; Volume = 1f; IsGlobal = true; Style = style; Play(); }
public static ActiveSound FindActiveSound(SoundStyle style) { if (!IsAudioSupported) { return(null); } return(_player.FindActiveSound(style)); }
public static SlotId PlayTrackedSound(SoundStyle style, Vector2 position) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) if (!IsAudioSupported) { return(SlotId.Invalid); } return(_player.Play(style, position)); }
public SlotId Play(SoundStyle style) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) if (Main.dedServ || style == null || !style.IsTrackable) { return(SlotId.Invalid); } ActiveSound activeSound = new ActiveSound(style); return(_trackedSounds.Add(activeSound)); }
public ActiveSound FindActiveSound(SoundStyle style) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) foreach (SlotVector <ActiveSound> .ItemPair item in (SlotVector <ActiveSound>)_trackedSounds) { if (item.Value.Style == style) { return(item.Value); } } return(null); }
public ActiveSound FindActiveSound(SoundStyle style) { using (IEnumerator <SlotVector <ActiveSound> .ItemPair> enumerator = ((IEnumerable <SlotVector <ActiveSound> .ItemPair>) this._trackedSounds).GetEnumerator()) { while (((IEnumerator)enumerator).MoveNext()) { SlotVector <ActiveSound> .ItemPair current = enumerator.Current; if (((ActiveSound)current.Value).Style == style) { return((ActiveSound)current.Value); } } } return((ActiveSound)null); }
public SlotId Play(SoundStyle style, Vector2 position) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) if (Main.dedServ || style == null || !style.IsTrackable) { return(SlotId.Invalid); } if (Vector2.DistanceSquared(Main.screenPosition + new Vector2(Main.screenWidth / 2, Main.screenHeight / 2), position) > 1E+08f) { return(SlotId.Invalid); } ActiveSound activeSound = new ActiveSound(style, position); return(_trackedSounds.Add(activeSound)); }
public static SlotId PlayTrackedSound(SoundStyle style) { return((SlotId)SlotId.Invalid); }
public static SlotId PlayTrackedSound(SoundStyle style) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) return(SlotId.Invalid); }
public static ActiveSound FindActiveSound(SoundStyle style) { return(null); }
public static SlotId PlayTrackedSound(SoundStyle style, Vector2 position) { return((SlotId)SlotId.Invalid); }
public SlotId Play(SoundStyle style) { return(Main.dedServ || style == null || !style.IsTrackable ? (SlotId)SlotId.Invalid : this._trackedSounds.Add(new ActiveSound(style))); }
public static SlotId PlayTrackedSound(SoundStyle style, Vector2 position) { return(!SoundEngine.IsAudioSupported ? (SlotId)SlotId.Invalid : SoundEngine._player.Play(style, position)); }
public static ActiveSound FindActiveSound(SoundStyle style) { return(!SoundEngine.IsAudioSupported ? (ActiveSound)null : SoundEngine._player.FindActiveSound(style)); }