Rename variable
This commit is contained in:
parent
99cf57956c
commit
43ccaae3ef
2 changed files with 5 additions and 5 deletions
|
@ -4,8 +4,8 @@
|
|||
|
||||
namespace pacman {
|
||||
|
||||
Ghost::Ghost(Atlas::Ghost spritesSet)
|
||||
: spritesSet(spritesSet) {
|
||||
Ghost::Ghost(Atlas::Ghost spriteSet)
|
||||
: spriteSet(spriteSet) {
|
||||
}
|
||||
|
||||
void Ghost::frighten() {
|
||||
|
@ -43,7 +43,7 @@ void Ghost::reset() {
|
|||
[[nodiscard]] GridPosition Ghost::currentSprite() const {
|
||||
switch (state) {
|
||||
default:
|
||||
return Atlas::ghostSprite(spritesSet, direction, (animationIndex % 2) == 0);
|
||||
return Atlas::ghostSprite(spriteSet, direction, (animationIndex % 2) == 0);
|
||||
case State::Eyes:
|
||||
return Atlas::eyeSprite(direction);
|
||||
case State::Frightened:
|
||||
|
|
|
@ -19,7 +19,7 @@ public:
|
|||
Eyes,
|
||||
};
|
||||
|
||||
explicit Ghost(Atlas::Ghost spritesSet);
|
||||
explicit Ghost(Atlas::Ghost spriteSet);
|
||||
virtual ~Ghost() = default;
|
||||
|
||||
[[nodiscard]] GridPosition currentSprite() const;
|
||||
|
@ -46,7 +46,7 @@ protected:
|
|||
virtual Position target(const GameState & gameState) const = 0;
|
||||
virtual Position initialPosition() const = 0;
|
||||
|
||||
Atlas::Ghost spritesSet;
|
||||
Atlas::Ghost spriteSet;
|
||||
Direction direction = Direction::NONE;
|
||||
double timeForAnimation = 0;
|
||||
int animationIndex = 0;
|
||||
|
|
Loading…
Reference in a new issue