SDLPP: allow using shared pointers when adding collisions
This commit is contained in:
parent
bd8a841e6f
commit
79d5f348c4
@ -49,6 +49,12 @@ public:
|
||||
collisionWidth(), collisionHeight(),
|
||||
getId() );
|
||||
}
|
||||
template < class T > void addCollision( const std::shared_ptr< T > &p ) {
|
||||
collisions.push_back( p );
|
||||
collisions.back()->updateCollision( collisionPushX(), collisionPushY(),
|
||||
collisionWidth(), collisionHeight(),
|
||||
getId() );
|
||||
}
|
||||
bool hasCollisions() const;
|
||||
const std::vector< std::shared_ptr< CollisionPolygon > > &
|
||||
getCollisions() const;
|
||||
|
Loading…
Reference in New Issue
Block a user