Removed needless function.
This commit is contained in:
parent
f384165e24
commit
b6002eb6fd
4 changed files with 0 additions and 19 deletions
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -52,8 +52,3 @@ Bullet::onCollide(Sprite& other) {
|
|||
setDelete(true);
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
Bullet::doesCollide(Sprite& other) {
|
||||
return &other != &mShooter;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,6 @@ public:
|
|||
const Yaml& config);
|
||||
|
||||
void onCollide(Sprite& other);
|
||||
void doesCollide(Sprite& other);
|
||||
|
||||
// Private variables.
|
||||
private:
|
||||
|
|
Reference in a new issue