using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using ShootingHero.Components.Manager;
using ShootingHero.Components.Bullets;
using Microsoft.Xna.Framework.Graphics;
using ShootingHero.Scene;
using ShootingHero.Components.Bullets.PlayerBullet;

namespace ShootingHero.Components.Players
{
	public class Remein : Player
	{
		bool boomMode = false;
		int boomCount = 0;

		public Remein ( Game game )
			: base ( game, Character.Remein )
		{
			
		}

		protected override void LoadContent ()
		{
			base.LoadContent ();
			Animation.Texture = Game.Content.Load<Texture2D> ( "Character/remein" );
		}

		public override void ShootBullet ( BulletManager bulletManager )
		{
			if ( !boomMode )
				bulletManager.Add ( new RemeinBullet ( Game, X, Y - 40, ( IsSuperMode ) ? 5 : Level ) );
			else
			{
				bulletManager.Add ( new RemeinBullet ( Game, X - 30, Y - 40, 5 ) );
				bulletManager.Add ( new RemeinBullet ( Game, X, Y - 40, 5 ) );
				bulletManager.Add ( new RemeinBullet ( Game, X + 30, Y - 40, 5 ) );
				boomCount++;
				if ( boomCount >= 10 )
					boomMode = false;
			}
		}

		public override void Boom ( BulletManager bulletManager )
		{
			boomMode = true;
			boomCount = 1;
		}
	}
}