25 lines
516 B
C++
25 lines
516 B
C++
#pragma once
|
|
|
|
#include "Atlas.hpp"
|
|
#include "Board.hpp"
|
|
#include "Direction.hpp"
|
|
#include "Position.hpp"
|
|
|
|
#include <chrono>
|
|
|
|
namespace pacman {
|
|
|
|
class PacManAnimation {
|
|
public:
|
|
[[nodiscard]] GridPosition animationFrame(Direction direction) const;
|
|
[[nodiscard]] GridPosition deathAnimationFrame() const;
|
|
|
|
void updateAnimationPosition(std::chrono::milliseconds time_delta, bool dead);
|
|
void pause();
|
|
|
|
private:
|
|
uint8_t animation_position = 0;
|
|
double animation_position_delta = 0.0;
|
|
};
|
|
|
|
} // namespace pacman
|