using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Blindfold.Managers;
using Microsoft.Xna.Framework.Audio;

namespace Blindfold.Objects
{
    public class EasterEgg : Obj
    {
        private Vector3 position;
        private SoundEffectInstance whistle;

        #region PROPERTIES
        public Vector3 POSITION
        {
            get
            {
                return position;
            }
        }
        #endregion

        public EasterEgg(Vector3 pos)
            : base()
        {
            position = pos;
            whistle = ObjManager.GAME.SOUNDMANAGER.getEffectInstance("easteregg");
        }

        public override void Update(GameTime gameTime)
        {
            if (!whistle.State.Equals(SoundState.Playing))
            {
                ObjManager.GAME.SOUNDMANAGER.playSound(whistle, position);
            }
        }

        public override void Draw(SpriteBatch sb)
        {
            sb.Draw(ObjManager.GAME.OBJTEX, new Rectangle(312 + (int)((position.X - ObjManager.GAME.PLAYER.POSITION.X) /* *10*/), 232 + (int)((position.Y - ObjManager.GAME.PLAYER.POSITION.Y) /* *10*/), 16, 16), Color.Lime);
            base.Draw(sb);
        }
    }
}
