TileMaps and cam debug added
This commit is contained in:
@ -90,10 +90,13 @@ public:
|
||||
|
||||
void update() override
|
||||
{
|
||||
for (int i=0;i<destRects.size()-1;i++){
|
||||
// SDL_Rect thisRect = destRects[i];
|
||||
destRects[i].x = destRects[i].x - Game::camera.x;
|
||||
destRects[i].y = destRects[i].y - Game::camera.y;
|
||||
if (Game::gsm->currentState == GameStateManager::ST_COREGAME){
|
||||
for (int i=0;i<destRects.size()-1;i++){
|
||||
if (Game::camera.x >= 352)
|
||||
destRects[i].x = destRects[i].x - Game::camera.x*0.01f;
|
||||
if (Game::camera.y >= 432)
|
||||
destRects[i].y = destRects[i].y - Game::camera.y*0.01f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user