feat: implement shapes for entities
This commit is contained in:
@@ -33,6 +33,9 @@ public:
|
||||
Rectangle() {}
|
||||
|
||||
const Point& getCenter() const { return m_Center; }
|
||||
float getCenterX() const { return m_Center.getX(); }
|
||||
float getCenterY() const { return m_Center.getY(); }
|
||||
|
||||
float getWidth() const { return m_Width; }
|
||||
float getHeight() const { return m_Height; }
|
||||
|
||||
@@ -40,6 +43,9 @@ public:
|
||||
Point getBottomRight() const { return { m_Center.getX() + (m_Width / 2.0f), m_Center.getY() + (m_Height / 2.0f) }; }
|
||||
|
||||
void setCenter(const Point& center) { m_Center = center; }
|
||||
void setCenterX(float x) { m_Center.setX(x); }
|
||||
void setCenterY(float y) { m_Center.setY(y); }
|
||||
|
||||
void setWidth(float width) { m_Width = width; }
|
||||
void setHeight(float height) { m_Height = height; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user