zombo-shooter/src/Game.hpp

41 lines
659 B
C++

#ifndef GAME_HPP
#define GAME_HPP
#include <thread>
#include <vector>
#include "Arrow.hpp"
#include "GameRenderer.hpp"
#include "Player.hpp"
#include "Map.hpp"
#include "Zombo.hpp"
#include "effects/Effect.hpp"
class Game
{
private:
GameRenderer renderer;
Player player;
Map map;
std::vector<Arrow> arrows;
std::vector<Zombo> zombos;
std::vector<std::unique_ptr<Effect>> effects;
std::unique_ptr<Sprite> arrow_sprite, zombo_sprite, gold_sprite;
Font *small_font, *normal_font;
std::mutex game_mutex;
unsigned int ticks = 0;
void update(std::stop_token stop_token);
public:
Game();
~Game() = default;
void run();
void draw();
};
#endif