diff --git a/sdlpp/sdlpp_renderobject.cpp b/sdlpp/sdlpp_renderobject.cpp index 101e681..d894c6e 100644 --- a/sdlpp/sdlpp_renderobject.cpp +++ b/sdlpp/sdlpp_renderobject.cpp @@ -63,6 +63,9 @@ RenderObject::colidesWith( const RenderObject &other ) const { } return ret; } +void RenderObject::removeCollisions() { + collisions.clear(); +} bool RenderObject::hasCollisions() const { return !collisions.empty(); } diff --git a/sdlpp/sdlpp_renderobject.hpp b/sdlpp/sdlpp_renderobject.hpp index ef9f97e..d67a1a9 100644 --- a/sdlpp/sdlpp_renderobject.hpp +++ b/sdlpp/sdlpp_renderobject.hpp @@ -59,6 +59,7 @@ public: collisionWidth(), collisionHeight(), getId() ); } + void removeCollisions(); bool hasCollisions() const; const std::vector< std::shared_ptr< CollisionPolygon > > & getCollisions() const;