Пример #1
0
 public ActiveSound(SoundStyle style, Vector2 position)
 {
     Position = position;
     Volume   = 1f;
     IsGlobal = false;
     Style    = style;
     Play();
 }
Пример #2
0
 public ActiveSound(SoundStyle style)
 {
     this.Position = Vector2.get_Zero();
     this.Volume   = 1f;
     this.IsGlobal = true;
     this._style   = style;
     this.Play();
 }
Пример #3
0
 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)));
 }
Пример #4
0
 public ActiveSound(SoundStyle style, Vector2 position)
 {
     this.Position = position;
     this.Volume   = 1f;
     this.IsGlobal = false;
     this._style   = style;
     this.Play();
 }
Пример #5
0
 public ActiveSound(SoundStyle style)
 {
     Position = Vector2.Zero;
     Volume   = 1f;
     IsGlobal = true;
     Style    = style;
     Play();
 }
Пример #6
0
 public static ActiveSound FindActiveSound(SoundStyle style)
 {
     if (!IsAudioSupported)
     {
         return(null);
     }
     return(_player.FindActiveSound(style));
 }
Пример #7
0
 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));
 }
Пример #8
0
        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));
        }
Пример #9
0
 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);
 }
Пример #10
0
 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);
 }
Пример #11
0
        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));
        }
Пример #12
0
 public static SlotId PlayTrackedSound(SoundStyle style)
 {
     return((SlotId)SlotId.Invalid);
 }
Пример #13
0
 public static SlotId PlayTrackedSound(SoundStyle style)
 {
     //IL_0000: Unknown result type (might be due to invalid IL or missing references)
     return(SlotId.Invalid);
 }
Пример #14
0
 public static ActiveSound FindActiveSound(SoundStyle style)
 {
     return(null);
 }
Пример #15
0
 public static SlotId PlayTrackedSound(SoundStyle style, Vector2 position)
 {
     return((SlotId)SlotId.Invalid);
 }
Пример #16
0
 public SlotId Play(SoundStyle style)
 {
     return(Main.dedServ || style == null || !style.IsTrackable ? (SlotId)SlotId.Invalid : this._trackedSounds.Add(new ActiveSound(style)));
 }
Пример #17
0
 public static SlotId PlayTrackedSound(SoundStyle style, Vector2 position)
 {
     return(!SoundEngine.IsAudioSupported ? (SlotId)SlotId.Invalid : SoundEngine._player.Play(style, position));
 }
Пример #18
0
 public static ActiveSound FindActiveSound(SoundStyle style)
 {
     return(!SoundEngine.IsAudioSupported ? (ActiveSound)null : SoundEngine._player.FindActiveSound(style));
 }