Ok, here's the link to the latest code. The sprite class has once again been streamlined, cutting out some confusing calls which manipulate the angle between degrees and radians. I basically realized the measurement only needs to be in the radian format in two places. First, and most importantly, in the call to draw the sprite requires radians, and anytime you want to use the MathHelper functions such as Cos and Sin (at least as far as I've been able to tell) to manipulate the measurement. Getting all that straightened out has helped with a lot of the issues, but I'm still seeing some screwy things with the way the bullets are supposed to be rotated to match the ships rotation. Anyways, here's the code - it's basically the ship that allows you to rotate around and fly off in the correct direction with the ability to fire bullets, albeit a little screwy. The ship will screen wrap back around but I haven't added that functionality to the bullets, I can't remember how the original went and haven't had a chance to look it up yet.
[https://drive.google.com/file/d/0B5moEgyck5X5SUNmbjFabk5rZFU/edit?usp=sharing]
*EDIT: Sorry about my post being late again. I did however, make some more changes to the basic code which I believe will make things run even smoother. If you're familiar with the framework so far, you'll know about the XNAObjectCollection and (from the Breakout clone) the GameObjectCollection. These two object collections are used to pass the XNA required objects around for rendering, and specific game objects which may need to interact with each other, respectively. In most of the previous code, you will see these objects as well as the StateManager Object being passed as parameters to various classes. Almost all of the Initialize methods HAD them. I realized last night, after a bottle of Barefoot Moscato that this was kind of inefficient. While it worked great for letting everything have access to the same objects and keeping things updated, I was adding a fair amount of overhead by creating duplicates in each class that needed them (and having to instantiate them in each class). So, a genius idea to cut things down occurred to me. Instead of passing all of these parameters (XNAObjectCollection, GameObjectCollection, and the Statemanager Object), I've made the XNAObjectCollection and the GameObjectCollection a public reference in the StateManager class. In this way, any class can access them simply by prefacing the object with the StateManager namespace. (Forgive me if I'm using the term namespace incorrectly, I am after all, still pretty new to C#). So, now instead of seeing something like this:
public void Initialize(XNAObjectCollection in_XNAObjectCollection, StateManager in_StateManager)
{
XNAObjectCollection = in_XNAObjectCollection;
XNAObjectCollection.gameTime=new GameTime();
GameObjectCollection.Initialize(XNAObjectCollection);
StateManager = in_StateManager;
}
where everything is passed in, you will see something like this:
public void Initialize(StateManager in_StateManager)
{
StateManager = in_StateManager;
}
and the calls to access the object collections will look like:
StateManager.XNAObjectCollection.spriteBatch.Draw(etc,etc);
StateManager.GameObjectCollection.Ship.Position.X=15.0f;