Renamed method.
This commit is contained in:
parent
392afec39c
commit
b5514b6af9
3 changed files with 5 additions and 5 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -36,7 +36,7 @@ Enemy::onThink(int elapsed) {
|
|||
setDirection(target->getPosition() - getPosition());
|
||||
pullTrigger();
|
||||
}
|
||||
else if (!isMoving())
|
||||
else if (isPathEmpty())
|
||||
setDestination(target->getPosition());
|
||||
}
|
||||
else {
|
||||
|
|
Reference in a new issue