SDLPP: add option to remove collisions

This commit is contained in:
zvon 2021-05-31 18:54:17 +02:00
parent 78c9b9feb0
commit 0b3689b0ae
2 changed files with 4 additions and 0 deletions

View File

@ -63,6 +63,9 @@ RenderObject::colidesWith( const RenderObject &other ) const {
} }
return ret; return ret;
} }
void RenderObject::removeCollisions() {
collisions.clear();
}
bool RenderObject::hasCollisions() const { bool RenderObject::hasCollisions() const {
return !collisions.empty(); return !collisions.empty();
} }

View File

@ -59,6 +59,7 @@ public:
collisionWidth(), collisionHeight(), collisionWidth(), collisionHeight(),
getId() ); getId() );
} }
void removeCollisions();
bool hasCollisions() const; bool hasCollisions() const;
const std::vector< std::shared_ptr< CollisionPolygon > > & const std::vector< std::shared_ptr< CollisionPolygon > > &
getCollisions() const; getCollisions() const;