debug draw

This commit is contained in:
SergoDobro 2024-08-18 23:34:26 +03:00
parent 21cb1d09aa
commit f379f14ec7
2 changed files with 6 additions and 2 deletions

View file

@ -48,6 +48,12 @@ namespace ZoFo.GameCore.GameObjects.Entities
}); });
} }
public override void Draw(SpriteBatch spriteBatch)
{
DrawDebugRectangle(spriteBatch, collisionComponent.stopRectangle.SetOrigin(position), Color.Orange);
base.Draw(spriteBatch);
}
} }
} }

View file

@ -83,8 +83,6 @@ public abstract class GameObject
{ {
graphicsComponent.Draw(graphicsComponent.ObjectDrawRectangle, spriteBatch); graphicsComponent.Draw(graphicsComponent.ObjectDrawRectangle, spriteBatch);
//debug //debug
DrawDebugRectangle(spriteBatch, graphicsComponent.ObjectDrawRectangle);
if (AppManager.Instance.InputManager.CollisionsCheat) if (AppManager.Instance.InputManager.CollisionsCheat)
DrawDebugRectangle(spriteBatch, graphicsComponent.ObjectDrawRectangle); DrawDebugRectangle(spriteBatch, graphicsComponent.ObjectDrawRectangle);