mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-26 00:45:20 +00:00
21 lines
499 B
C#
21 lines
499 B
C#
using Microsoft.Xna.Framework;
|
|
using MonoGame.Extended.Entities;
|
|
|
|
namespace Platformer.Collisions
|
|
{
|
|
public enum BodyType
|
|
{
|
|
Static, Dynamic
|
|
}
|
|
|
|
[EntityComponent]
|
|
public class Body
|
|
{
|
|
public BodyType BodyType { get; set; } = BodyType.Static;
|
|
public Vector2 Position { get; set; }
|
|
public Vector2 Velocity;
|
|
public AABB BoundingBox => new AABB(Position - Size / 2f, Position + Size / 2f);
|
|
public Vector2 Size { get; set; }
|
|
}
|
|
}
|