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

namespace ShootingHero.Components.Players
{
	public class Gloria : Player
	{
		public Gloria ( Game game )
			: base ( game, Character.Gloria )
		{ 
		
		}

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

		public override void ShootBullet ( BulletManager bulletManager )
		{
			int level = IsSuperMode ? 5 : Level;
			switch ( level )
			{
				case 1:
					bulletManager.Add ( new GloriaBullet ( Game, X, Y - 40, 0, false ) );
					break;
				case 2:
					bulletManager.Add ( new GloriaBullet ( Game, X, Y - 40, Microsoft.Xna.Framework.MathHelper.ToRadians ( -25 ), false ) );
					bulletManager.Add ( new GloriaBullet ( Game, X, Y - 40, Microsoft.Xna.Framework.MathHelper.ToRadians ( 25 ), false ) );
					break;
				case 3:
					bulletManager.Add ( new GloriaBullet ( Game, X, Y - 40, Microsoft.Xna.Framework.MathHelper.ToRadians ( -25 ), false ) );
					bulletManager.Add ( new GloriaBullet ( Game, X, Y - 40, 0, false ) );
					bulletManager.Add ( new GloriaBullet ( Game, X, Y - 40, Microsoft.Xna.Framework.MathHelper.ToRadians ( 25 ), false ) );
					break;
				case 4:
					bulletManager.Add ( new GloriaBullet ( Game, X, Y - 40, Microsoft.Xna.Framework.MathHelper.ToRadians ( -20 ), false ) );
					bulletManager.Add ( new GloriaBullet ( Game, X, Y - 40, Microsoft.Xna.Framework.MathHelper.ToRadians ( -10 ), false ) );
					bulletManager.Add ( new GloriaBullet ( Game, X, Y - 40, Microsoft.Xna.Framework.MathHelper.ToRadians ( 10 ), false ) );
					bulletManager.Add ( new GloriaBullet ( Game, X, Y - 40, Microsoft.Xna.Framework.MathHelper.ToRadians ( 20 ), false ) );
					break;
				case 5:
					bulletManager.Add ( new GloriaBullet ( Game, X, Y - 40, Microsoft.Xna.Framework.MathHelper.ToRadians ( -20 ), false ) );
					bulletManager.Add ( new GloriaBullet ( Game, X, Y - 40, Microsoft.Xna.Framework.MathHelper.ToRadians ( -10 ), false ) );
					bulletManager.Add ( new GloriaBullet ( Game, X, Y - 40, 0, false ) );
					bulletManager.Add ( new GloriaBullet ( Game, X, Y - 40, Microsoft.Xna.Framework.MathHelper.ToRadians ( 10 ), false ) );
					bulletManager.Add ( new GloriaBullet ( Game, X, Y - 40, Microsoft.Xna.Framework.MathHelper.ToRadians ( 20 ), false ) );
					break;
			}
		}

		public override void Boom ( BulletManager bulletManager )
		{
			for ( int i = 0; i < 360; i += 10 )
			{
				bulletManager.Add ( new GloriaBullet ( Game, X, Y, Microsoft.Xna.Framework.MathHelper.ToRadians ( i ), true ) );
			}
		}
	}
}
