using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace PArena
{
    class Bullet_Shotgun:Bullet
    {
        static float initSpeed = 300;
        public Bullet_Shotgun(Vector2 pos, Vector2 dir, Texture2D tex, float mul)
            : base(pos, dir, tex, initSpeed)
        {
            double angle=Game1.rnd.NextDouble()*MathHelper.PiOver4-MathHelper.PiOver4/2;
            Matrix m = Matrix.CreateFromAxisAngle(Vector3.UnitZ, (float)angle);
            Dir = Vector2.Transform(dir, m);            
            Dir.Normalize();
            pos += Dir * ((float)Game1.rnd.NextDouble() * 20 - 10);
            tailColor = Color.Orange;
            tailLength = 2;
            positions = new List<VecColor>();
            positions.Add(new VecColor(pos,Color.Red));
            ttl = 0.6f * (float)Game1.rnd.NextDouble() + 0.3f;
            damage = 20*mul;
            soundfx = Cnt.game.soundBank.GetCue("shotgun");
        }
    }
}
