From f379f14ec7ef18a292930baca4fc844670914fdd Mon Sep 17 00:00:00 2001 From: SergoDobro Date: Sun, 18 Aug 2024 23:34:26 +0300 Subject: [PATCH] debug draw --- ZoFo/GameCore/GameObjects/Entities/Entity.cs | 6 ++++++ ZoFo/GameCore/GameObjects/GameObject.cs | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ZoFo/GameCore/GameObjects/Entities/Entity.cs b/ZoFo/GameCore/GameObjects/Entities/Entity.cs index 3b88ad8..f0e4ebf 100644 --- a/ZoFo/GameCore/GameObjects/Entities/Entity.cs +++ b/ZoFo/GameCore/GameObjects/Entities/Entity.cs @@ -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); + } } } diff --git a/ZoFo/GameCore/GameObjects/GameObject.cs b/ZoFo/GameCore/GameObjects/GameObject.cs index 85189ea..5e40de1 100644 --- a/ZoFo/GameCore/GameObjects/GameObject.cs +++ b/ZoFo/GameCore/GameObjects/GameObject.cs @@ -83,8 +83,6 @@ public abstract class GameObject { graphicsComponent.Draw(graphicsComponent.ObjectDrawRectangle, spriteBatch); //debug - DrawDebugRectangle(spriteBatch, graphicsComponent.ObjectDrawRectangle); - if (AppManager.Instance.InputManager.CollisionsCheat) DrawDebugRectangle(spriteBatch, graphicsComponent.ObjectDrawRectangle);