0
0
mirror of https://github.com/Nimac0/SDL_Minigame synced 2026-01-12 13:43:41 +00:00
SDL_Minigame/include/Manager.h

34 lines
605 B
C++

#pragma once
#include <iostream>
#include <array>
#include <memory>
#include <vector>
#include "Constants.h"
#include "Entity.h"
class GameInternal;
class Manager
{
public:
Manager(GameInternal* game) : game(game) {};
void update();
void refresh();
void addToGroup(Entity* mEntity, Group mGroup);
std::vector<Entity*>& getGroup(Group mGroup);
std::vector<Entity*> getAll();
Entity& addEntity();
GameInternal* getGame() { return this->game; };
private:
GameInternal* game;
std::vector<std::unique_ptr<Entity>> entities;
std::array<std::vector<Entity*>, MAX_GROUPS> entitiesByGroup;
};