ColisionTracerOn
This commit is contained in:
parent
abbcdba429
commit
087472ddc3
4 changed files with 20 additions and 2 deletions
|
@ -55,7 +55,7 @@ namespace DangerousD.GameCore
|
||||||
{
|
{
|
||||||
GraphicsComponent.DrawAnimation(Rectangle, spriteBatch);
|
GraphicsComponent.DrawAnimation(Rectangle, spriteBatch);
|
||||||
//debug
|
//debug
|
||||||
// spriteBatch.Draw(debugTexture, Rectangle, Color.White);
|
spriteBatch.Draw(debugTexture,new Rectangle(Rectangle.X-GraphicsComponent.CameraPosition.X,Rectangle.Y-GraphicsComponent.CameraPosition.Y,Rectangle.Width,Rectangle.Height), Color.White);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -22,8 +22,10 @@ public abstract class MapObject : GameObject
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Draw(SpriteBatch spriteBatch)
|
public virtual void Draw(SpriteBatch spriteBatch)
|
||||||
{
|
{
|
||||||
GraphicsComponent.DrawAnimation(Rectangle, spriteBatch, _sourceRectangle);
|
GraphicsComponent.DrawAnimation(Rectangle, spriteBatch, _sourceRectangle);
|
||||||
|
//spriteBatch.Draw(debugTexture, new Rectangle(Rectangle.X - GraphicsComponent.CameraPosition.X, Rectangle.Y - GraphicsComponent.CameraPosition.Y, Rectangle.Width, Rectangle.Height), Color.White);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
using DangerousD.GameCore.Graphics;
|
using DangerousD.GameCore.Graphics;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
|
|
||||||
namespace DangerousD.GameCore.GameObjects.MapObjects;
|
namespace DangerousD.GameCore.GameObjects.MapObjects;
|
||||||
|
|
||||||
|
@ -9,5 +10,12 @@ public class Platform : MapObject
|
||||||
public Platform(Vector2 position, Vector2 size, Rectangle sourceRectangle) : base(position, size, sourceRectangle)
|
public Platform(Vector2 position, Vector2 size, Rectangle sourceRectangle) : base(position, size, sourceRectangle)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
public override void Draw(SpriteBatch spriteBatch)
|
||||||
|
{
|
||||||
|
base.Draw(spriteBatch);
|
||||||
|
//debug
|
||||||
|
spriteBatch.Draw(debugTexture, new Rectangle(Rectangle.X - GraphicsComponent.CameraPosition.X, Rectangle.Y - GraphicsComponent.CameraPosition.Y, Rectangle.Width, Rectangle.Height), Color.White);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
using DangerousD.GameCore.Graphics;
|
using DangerousD.GameCore.Graphics;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
|
|
||||||
namespace DangerousD.GameCore.GameObjects.MapObjects;
|
namespace DangerousD.GameCore.GameObjects.MapObjects;
|
||||||
|
|
||||||
|
@ -9,4 +10,11 @@ public class StopTile : MapObject
|
||||||
public StopTile(Vector2 position, Vector2 size, Rectangle sourceRectangle) : base(position, size, sourceRectangle)
|
public StopTile(Vector2 position, Vector2 size, Rectangle sourceRectangle) : base(position, size, sourceRectangle)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
public override void Draw(SpriteBatch spriteBatch)
|
||||||
|
{
|
||||||
|
base.Draw(spriteBatch);
|
||||||
|
//debug
|
||||||
|
spriteBatch.Draw(debugTexture, new Rectangle(Rectangle.X - GraphicsComponent.CameraPosition.X, Rectangle.Y - GraphicsComponent.CameraPosition.Y, Rectangle.Width, Rectangle.Height), Color.White);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue