using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using ShootingHero.Components.Bullets.BossBullet;

namespace ShootingHero.Components.Monsters.Bosses
{
	public class Chicken : Boss
	{
		static Texture2D texture;
		float lrMover = 3.141592f / 2;

		public Chicken ( Game game, float timeUnit )
			: base ( game, timeUnit, 200 )
		{
			if ( texture == null || texture.IsDisposed )
				texture = Game.Content.Load<Texture2D> ( "Boss/cock" );
			Texture = texture;
			TadaPosition = 100;
			Width = texture.Height / 2 - 40;
			Timer.Delay = 1000;
		}

		protected override void ShootBullet ( Manager.BulletManager bulletManager )
		{
			bulletManager.Add ( new ChickenBullet ( Game, X, Y, Microsoft.Xna.Framework.MathHelper.ToRadians ( 180 + -25 ) ) );
			bulletManager.Add ( new ChickenBullet ( Game, X, Y, Angle + Microsoft.Xna.Framework.MathHelper.ToRadians ( 180 + 25 ) ) );
		}

		protected override void MoveLogic ( GameTime gameTime )
		{
			lrMover += gameTime.ElapsedGameTime.Milliseconds / 2000.0f;
			X += ( float ) Math.Sin ( lrMover );
		}
	}
}
