pacman/lib/include/Fruits.hpp
2021-09-15 13:39:42 +02:00

25 lines
466 B
C++

#pragma once
#include "Position.hpp"
#include <chrono>
namespace pacman {
struct GameState;
class Fruits {
public:
void update(std::chrono::milliseconds time_delta, const GameState & gameState);
GridPosition currentSprite() const;
Position position() const;
bool isVisible() const;
int value() const;
int eat();
private:
void hide();
bool visible = false;
int index = 0;
std::chrono::milliseconds time_visible{ 0 };
};
} // namespace pacman