Removed needless function.

This commit is contained in:
Felix Ableitner 2012-12-23 15:52:38 +01:00
parent f384165e24
commit b6002eb6fd
4 changed files with 0 additions and 19 deletions

View file

@ -128,18 +128,6 @@ Sprite::draw(sf::RenderTarget& target, sf::RenderStates states) const {
target.draw(*mShape, states);
}
/**
* This method filters collisions with other sprites. Implement it if you want to
* limit collisions to/with certain objects. Default implementation always returns true.
*
* @param other The Sprite this object is about to collide with.
* @return True if the objects should collide.
*/
bool
Sprite::doesCollide(Sprite& other) {
return true;
}
/**
* Called when a collision with another Sprite occured. Override this method
* to manage collision events.

View file

@ -65,7 +65,6 @@ public:
sf::Vector2f getSize() const;
virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const;
virtual bool doesCollide(Sprite& other);
virtual void onCollide(Sprite& other);
// Public variables.

View file

@ -52,8 +52,3 @@ Bullet::onCollide(Sprite& other) {
setDelete(true);
}
}
bool
Bullet::doesCollide(Sprite& other) {
return &other != &mShooter;
}

View file

@ -26,7 +26,6 @@ public:
const Yaml& config);
void onCollide(Sprite& other);
void doesCollide(Sprite& other);
// Private variables.
private: