Reimplemented the push/pop entity methods in RoomManager
Some accessors in Entity had to be made const, as they were being called from lambdas with const parameters.
This commit is contained in:
@@ -33,14 +33,14 @@ Vector2 Entity::SetMotion(Vector2 v) {
|
||||
return motion = v;
|
||||
}
|
||||
|
||||
int Entity::GetRoomIndex() {
|
||||
int Entity::GetRoomIndex() const {
|
||||
return roomIndex;
|
||||
}
|
||||
|
||||
Vector2 Entity::GetOrigin() {
|
||||
Vector2 Entity::GetOrigin() const {
|
||||
return origin;
|
||||
}
|
||||
|
||||
Vector2 Entity::GetMotion() {
|
||||
Vector2 Entity::GetMotion() const {
|
||||
return motion;
|
||||
}
|
||||
@@ -32,9 +32,9 @@ public:
|
||||
Vector2 SetOrigin(Vector2 v);
|
||||
Vector2 SetMotion(Vector2 v);
|
||||
|
||||
int GetRoomIndex();
|
||||
Vector2 GetOrigin();
|
||||
Vector2 GetMotion();
|
||||
int GetRoomIndex() const;
|
||||
Vector2 GetOrigin() const;
|
||||
Vector2 GetMotion() const;
|
||||
|
||||
protected:
|
||||
Entity() = default;
|
||||
|
||||
Reference in New Issue
Block a user