using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
using Primitives3D;

namespace FredriksdalAssault2
{
    public class Bullet
    {
        #region Variables

        // Position, direction and speed for bullet.
        public Vector3 bulletPosition;
        public Vector3 bulletDirection;
        public float bulletSpeed;

        #endregion

        #region Constructors

        /// <summary>
        /// Create a new bullet.
        /// </summary>
        /// <param name="position"></param>
        /// <param name="direction"></param>
        /// <param name="speed"></param>
        public Bullet(Vector3 position, Vector3 direction, float speed)
        {

            // Set position, direction and speed.
            this.bulletPosition = position - (direction * speed);
            this.bulletDirection = direction;
            this.bulletSpeed = speed;

        }

        #endregion

        #region Methods

        /// <summary>
        /// Update the position and world matrix for the bullet.
        /// </summary>
        /// <param name="gameTime"></param>
        public void UpdateBullet(GameTime gameTime)
        {
            // Set a new position for the bullet.
            this.bulletPosition += this.bulletDirection * this.bulletSpeed;

        }

        #endregion

    } // End of class

} // End of namespace
