pacman/lib/include/GameState.hpp
2021-10-19 10:50:21 +02:00

43 lines
824 B
C++

#pragma once
#include "Blinky.hpp"
#include "Dave.hpp"
#include "Fruits.hpp"
#include "Ghost.hpp"
#include "Inky.hpp"
#include "InputState.hpp"
#include "PacMan.hpp"
#include "PacManAI.hpp"
#include "Pellets.hpp"
#include "Pinky.hpp"
#include "Score.hpp"
#include "SuperPellets.hpp"
namespace pacman {
struct GameState {
void step(std::chrono::milliseconds delta);
Blinky blinky;
Pinky pinky;
Inky inky;
PacMan pacMan;
PacManAI pacManAI;
InputState inputState;
Pellets pellets;
SuperPellets superPellets;
Fruits fruit;
Score score;
std::chrono::milliseconds timeSinceDeath{};
void checkCollision(Ghost & ghost);
void handleDeathAnimation(std::chrono::milliseconds delta);
void eatPellets();
void eatFruit();
void killPacMan();
bool isPacManDying() const;
};
} // namespace pacman