Пример #1
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));
        }
Пример #2
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));
        }