predictCollisions func added to Game.cpp

This commit is contained in:
2022-05-13 23:20:08 -04:00
parent e28a9cebdb
commit 36adcdeac7
7 changed files with 70 additions and 20 deletions

View File

@ -16,6 +16,7 @@
#include "Vector2D.h"
#include "../assetmgr/AssetManager.h"
#include "GameStateManager.h"
#include "tmxparser.h"
class ColliderComponent;
class AssetManager;
@ -29,13 +30,17 @@ public:
void update();
void render();
void clean();
void printDebug(std::string debugInfo);
// void printDebug(std::string debugInfo);
static void drawLine(Vector2D srcpt, Vector2D destpt, int red, int green, int blue);
static int * predictCollisions();
bool running() { return isRunning; }
// static void AddTile(int srcX, int srcY, int xpos, int ypos);
static SDL_Renderer *renderer;
static SDL_Event event;
// static std::vector<ColliderComponent*> colliders;
// static tmxparser::TmxMap map;
// gameScene;
static bool debugMenu;
static bool isRunning;
static bool debugCollisionBoxes;
@ -48,6 +53,8 @@ public:
static SDL_Rect levelMap;
static AssetManager* assets;
static GameStateManager* gsm;
static int pTileX;
static int pTileY;
std::string BoolToString(bool b);
enum groupLabels : std::size_t
{