Removed unused function.
This commit is contained in:
parent
439231727a
commit
acafb57fec
3 changed files with 1 additions and 11 deletions
|
@ -236,7 +236,7 @@ World::step(int elapsed) {
|
||||||
it--;
|
it--;
|
||||||
}
|
}
|
||||||
// Apply movement for movable sprites.
|
// Apply movement for movable sprites.
|
||||||
else if ((*it)->isMovable()) {
|
else if ((*it)->getSpeed() != sf::Vector2f()) {
|
||||||
sf::Vector2f speed = spriteA->getSpeed();
|
sf::Vector2f speed = spriteA->getSpeed();
|
||||||
speed *= elapsed / 1000.0f;
|
speed *= elapsed / 1000.0f;
|
||||||
bool overlap = false;
|
bool overlap = false;
|
||||||
|
|
|
@ -149,15 +149,6 @@ Sprite::collisionEnabled(Category category) const {
|
||||||
return (category & mMask) != 0;
|
return (category & mMask) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if this sprite is able to move, currently decided by shape
|
|
||||||
* (circle can move, rectangle can not).
|
|
||||||
*/
|
|
||||||
bool
|
|
||||||
Sprite::isMovable() const {
|
|
||||||
return mShape.type == Shape::Type::CIRCLE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a collision with another Sprite occured. Override this method
|
* Called when a collision with another Sprite occured. Override this method
|
||||||
* to manage collision events.
|
* to manage collision events.
|
||||||
|
|
|
@ -66,7 +66,6 @@ public:
|
||||||
sf::Vector2f getSize() const;
|
sf::Vector2f getSize() const;
|
||||||
virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const;
|
virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const;
|
||||||
bool collisionEnabled(Category category) const;
|
bool collisionEnabled(Category category) const;
|
||||||
bool isMovable() const;
|
|
||||||
|
|
||||||
virtual void onCollide(std::shared_ptr<Sprite> other);
|
virtual void onCollide(std::shared_ptr<Sprite> other);
|
||||||
|
|
||||||
|
|
Reference in a new issue