Browse Source

Removing unneeded comments

Adding a check in Body class to make sure fixtures exist before executing code
master
Nathan Adams 10 years ago
parent
commit
60a106a27c
  1. 5
      axios/Dynamics/Body.cs
  2. 6
      axios/Engine/SimpleDrawableAxiosGameObject.cs

5
axios/Dynamics/Body.cs

@ -827,6 +827,11 @@ namespace FarseerPhysics.Dynamics
/// <param name="angle">The angle.</param>
public void SetTransformIgnoreContacts(ref Vector2 position, float angle)
{
// Sometimes this is called with an empty Fixture list
// -- Nathan Adams [adamsna@datanethost.net] - 6/2/2012
if (FixtureList == null || FixtureList.Count == 0)
return;
Xf.R.Set(angle);
Xf.Position = position;

6
axios/Engine/SimpleDrawableAxiosGameObject.cs

@ -33,16 +33,12 @@ namespace Axios.Engine
public override void LoadContent(AxiosGameScreen gameScreen)
{
base.LoadContent(gameScreen);
//this.Texture = new Texture2D(gameScreen.ScreenManager.GraphicsDevice, 1, 1);
}
public virtual void Draw(AxiosGameScreen gameScreen, GameTime gameTime)
{
/*#if DEBUG
System.Diagnostics.Debugger.Break();
#endif*/
if (_relativetocamera)
gameScreen.ScreenManager.SpriteBatch.Begin(0, null, null, null, null, null, gameScreen.Camera.View);
else

Loading…
Cancel
Save