ColliderServices

Namespace: Murder.Services
Assembly: Murder.dll

public static class ColliderServices

⭐ Methods

GetBoundingBox(Entity)

public IntRectangle GetBoundingBox(Entity e)

Parameters
e Entity

Returns
IntRectangle

ToGrid(IntRectangle)

public IntRectangle ToGrid(IntRectangle rectangle)

Parameters
rectangle IntRectangle

Returns
IntRectangle

GetCollidersBoundingBox(Entity, bool)

public IntRectangle[] GetCollidersBoundingBox(Entity e, bool gridCoordinates)

Parameters
e Entity
gridCoordinates bool

Returns
IntRectangle[]

FindCenter(Entity)

public Point FindCenter(Entity e)

Returns the center point of an entity with all its colliders.

Parameters
e Entity

Returns
Point

SnapToGrid(Vector2)

public Vector2 SnapToGrid(Vector2 positive)

Parameters
positive Vector2

Returns
Vector2

SnapToRelativeGrid(Vector2, Vector2)

public Vector2 SnapToRelativeGrid(Vector2 position, Vector2 origin)

Parameters
position Vector2
origin Vector2

Returns
Vector2