SDLPP: add option to remove collisions
This commit is contained in:
parent
78c9b9feb0
commit
0b3689b0ae
@ -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();
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user