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:
Kayne Ruse
2015-01-02 23:25:59 +11:00
parent 0344fe0d6d
commit d815f17442
6 changed files with 62 additions and 6 deletions
+3 -3
View File
@@ -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;
}
+3 -3
View File
@@ -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;