Add noclip member to entity
This commit is contained in:
@@ -49,6 +49,9 @@ namespace CaveGame::Core {
|
||||
Vector2 Size() const;
|
||||
|
||||
virtual void CollisionTest(ITileMap* map, float step) {}
|
||||
|
||||
void SetNoclip(bool value);
|
||||
[[nodiscard]] bool IsNoclip() const;
|
||||
protected:
|
||||
int health;
|
||||
int max_health;
|
||||
@@ -65,6 +68,7 @@ namespace CaveGame::Core {
|
||||
float climbing_skill = 55;
|
||||
bool facing_left = true;
|
||||
bool walking = false;
|
||||
bool noclip = false;
|
||||
private:
|
||||
|
||||
};
|
||||
|
@@ -11,3 +11,9 @@ int CaveGame::Core::Entity::MaxHealth() const { return max_health; }
|
||||
Vector2 CaveGame::Core::Entity::Position() const { return position;}
|
||||
|
||||
Vector2 CaveGame::Core::Entity::Size() const { return bounding_box;}
|
||||
|
||||
void CaveGame::Core::Entity::SetNoclip(bool value) {
|
||||
this->noclip = value;
|
||||
}
|
||||
|
||||
bool CaveGame::Core::Entity::IsNoclip() const { return this->noclip; }
|
||||
|
Reference in New Issue
Block a user