Renamed method.

This commit is contained in:
Felix Ableitner 2013-08-18 13:32:54 +02:00
parent 392afec39c
commit b5514b6af9
3 changed files with 5 additions and 5 deletions

View file

@ -160,11 +160,11 @@ Character::move() {
}
/**
* Returns true if the character is currently moving.
* Returns true if the path is empty.
*/
bool
Character::isMoving() const {
return !mPath.empty();
Character::isPathEmpty() const {
return mPath.empty();
}
/**

View file

@ -46,7 +46,7 @@ protected:
void pullTrigger();
void releaseTrigger();
bool setDestination(const Vector2f& destination);
bool isMoving() const;
bool isPathEmpty() const;
bool isVisible(const Vector2f& target) const;
std::vector<std::shared_ptr<Character> > getCharacters() const;
int getMagazineAmmo() const;

View file

@ -36,7 +36,7 @@ Enemy::onThink(int elapsed) {
setDirection(target->getPosition() - getPosition());
pullTrigger();
}
else if (!isMoving())
else if (isPathEmpty())
setDestination(target->getPosition());
}
else {