#pragma once #include #include #include #include #include #include class AssetManager; class ColliderComponent; class Game { public: Game(); ~Game(); void init(const char* title, int xpos, int ypos, int width, int height, bool fullscreen); void handleEvents(); void update(); void render(); void clean(); bool running(); static void addTile(int id, int x, int y); static SDL_Renderer* renderer; static SDL_Event event; static std::vector colliders; static AssetManager* assets; enum GroupLabel { GROUP_MAP, GROUP_PLAYERS, GROUP_ENEMIES, GROUP_COLLIDERS, PROJECTILE, HEARTS }; bool getWinner(); private: int counter = 0; bool isRunning = false; SDL_Window* window; //true for player1 win / false for player2 win; bool winner; };