Continued work on tilemaps/debug
This commit is contained in:
@ -91,11 +91,17 @@ public:
|
||||
void update() override
|
||||
{
|
||||
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;
|
||||
if (Game::pVel.x > 0)
|
||||
destRects[i].x = destRects[i].x - Game::pVel.x;
|
||||
if (Game::pVel.y > 0)
|
||||
destRects[i].y = destRects[i].y - Game::pVel.y;
|
||||
if (Game::pVel.x < 0)
|
||||
destRects[i].x = destRects[i].x - Game::pVel.x;
|
||||
if (Game::pVel.y < 0)
|
||||
destRects[i].y = destRects[i].y - Game::pVel.y;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user