using System; using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.GamerServices; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Net; using Microsoft.Xna.Framework.Storage; // Local using statements using XNAEngine; using CollisionDetection; using LinearAlgebra; // Run Data Structure by Dr. Roger Webster namespace XNACollisionDetection { public class Missile : CollidableModel { String m_hit; Vector3 m_hitPos = Vector3.Zero; bool isActive; float totaldist; float speed; public Missile(Model model) : base(model) { isActive = false; totaldist = 0; speed = 0.1f; } public void Reset() { isActive = false; totaldist = 0; speed = 0.1f; } public void setActive(bool s) { isActive = s; } public bool getActive() { return (isActive); } public void MoveForward() { move(Direction.Forward, speed); totaldist += speed; } public void SetSpeed(float s) { speed = s; } public float GetSpeed() { return (speed); } public float GetTotalDistance() { return (totaldist); } } }