Removing unneeded comments
Adding a check in Body class to make sure fixtures exist before executing code
This commit is contained in:
parent
14cbefc6ef
commit
60a106a27c
@ -827,6 +827,11 @@ namespace FarseerPhysics.Dynamics
|
|||||||
/// <param name="angle">The angle.</param>
|
/// <param name="angle">The angle.</param>
|
||||||
public void SetTransformIgnoreContacts(ref Vector2 position, float angle)
|
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.R.Set(angle);
|
||||||
Xf.Position = position;
|
Xf.Position = position;
|
||||||
|
|
||||||
|
@ -34,15 +34,11 @@ namespace Axios.Engine
|
|||||||
{
|
{
|
||||||
base.LoadContent(gameScreen);
|
base.LoadContent(gameScreen);
|
||||||
|
|
||||||
//this.Texture = new Texture2D(gameScreen.ScreenManager.GraphicsDevice, 1, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void Draw(AxiosGameScreen gameScreen, GameTime gameTime)
|
public virtual void Draw(AxiosGameScreen gameScreen, GameTime gameTime)
|
||||||
{
|
{
|
||||||
|
|
||||||
/*#if DEBUG
|
|
||||||
System.Diagnostics.Debugger.Break();
|
|
||||||
#endif*/
|
|
||||||
if (_relativetocamera)
|
if (_relativetocamera)
|
||||||
gameScreen.ScreenManager.SpriteBatch.Begin(0, null, null, null, null, null, gameScreen.Camera.View);
|
gameScreen.ScreenManager.SpriteBatch.Begin(0, null, null, null, null, null, gameScreen.Camera.View);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user