RectPositionComponent
Namespace: Murder.Components
Assembly: Murder.dll
public sealed struct RectPositionComponent : IParentRelativeComponent, IComponent
Implements: IParentRelativeComponent, IComponent
⭐ Constructors
public RectPositionComponent(float top, float left, float bottom, float right, Vector2 size, Vector2 origin, IComponent parent)
Parameters
top
float
left
float
bottom
float
right
float
size
Vector2
origin
Vector2
parent
IComponent
⭐ Properties
HasParent
public virtual bool HasParent { get; }
Returns
bool
Origin
public readonly Vector2 Origin;
Returns
Vector2
Size
public readonly Vector2 Size;
Returns
Vector2
⭐ Methods
GetBox(Entity, Point, T?)
public Rectangle GetBox(Entity entity, Point screenSize, T? referenceSize)
Parameters
entity
Entity
screenSize
Point
referenceSize
T?
Returns
Rectangle
AddPadding(RectPositionComponent)
public RectPositionComponent AddPadding(RectPositionComponent b)
Parameters
b
RectPositionComponent
Returns
RectPositionComponent
WithSize(Vector2)
public RectPositionComponent WithSize(Vector2 size)
Parameters
size
Vector2
Returns
RectPositionComponent
WithoutParent()
public virtual IParentRelativeComponent WithoutParent()
Returns
IParentRelativeComponent
OnParentModified(IComponent, Entity)
public virtual void OnParentModified(IComponent parentComponent, Entity childEntity)
Parameters
parentComponent
IComponent
childEntity
Entity
⚡