Merge pull request #24 from progtime-net/Development
GameObjects prepared for map
This commit is contained in:
commit
92310460b5
2 changed files with 7 additions and 5 deletions
|
@ -10,13 +10,13 @@ using ZoFo.GameCore.ZoFo_graphics;
|
|||
|
||||
namespace ZoFo.GameCore.GameObjects.MapObjects
|
||||
{
|
||||
internal class MapObject : GameObject
|
||||
public class MapObject : GameObject
|
||||
{
|
||||
public virtual bool IsColliderOn { get; protected set; } = true;
|
||||
private Rectangle _sourceRectangle;
|
||||
protected override GraphicsComponent graphicsComponent => new("tiles");
|
||||
|
||||
public MapObject(Vector2 position, Vector2 size, Rectangle sourceRectangle) : base(position)
|
||||
public MapObject(Vector2 position, Vector2 size, Rectangle sourceRectangle, string textureName) : base(position)
|
||||
{
|
||||
_sourceRectangle = sourceRectangle;
|
||||
graphicsComponent.ObjectDrawRectangle = new Rectangle(0,0, (int)size.X, (int)size.Y);
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using ZoFo.GameCore.GameManagers.CollisionManager;
|
||||
using ZoFo.GameCore.ZoFo_graphics;
|
||||
|
||||
namespace ZoFo.GameCore.GameObjects.MapObjects.StopObjects;
|
||||
|
||||
public abstract class StopObject : GameObject
|
||||
public class StopObject : MapObject
|
||||
{
|
||||
protected StopObject(Vector2 position) : base(position)
|
||||
CollisionComponent collisionComponent;
|
||||
|
||||
protected StopObject(Vector2 position, Vector2 size, Rectangle sourceRectangle) : base(position, size, sourceRectangle)
|
||||
{
|
||||
//TODO
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue