Add noclip member to entity

This commit is contained in:
2025-03-31 16:35:44 -04:00
parent 4538aa963b
commit c7f98a1be6
2 changed files with 10 additions and 0 deletions

View File

@@ -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:
};

View File

@@ -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; }