dodatna logika
This commit is contained in:
@@ -21,10 +21,13 @@ namespace Game::Object::Components {
|
||||
void start(Object::Entity* thisEntity) override;
|
||||
void update(float deltaTime, Object::Entity* thisEntity) override;
|
||||
|
||||
void setScale(float scale) { mScale = scale; }
|
||||
float getScale() const { return mScale; }
|
||||
BoxColliderBounds getBounds() const { return mBounds; }
|
||||
bool isColliding() const { return !mCollidingWith.empty(); }
|
||||
|
||||
private:
|
||||
float mScale = 1.f;
|
||||
BoxColliderBounds mBounds{0.f, 0.f, 0.f, 0.f};
|
||||
std::unordered_set<Object::Entity*> mCollidingWith; // Track collisions per-entity so enter/stay/exit callbacks remain correct with multiple colliders
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user