Arreglado el problema con las plataormas verticales. Se iba un pixel
This commit is contained in:
@@ -86,10 +86,10 @@ void Game::update()
|
||||
}
|
||||
}
|
||||
|
||||
map->update();
|
||||
enemyEngine->update();
|
||||
player->update();
|
||||
checkScreenBorders();
|
||||
enemyEngine->update();
|
||||
map->update();
|
||||
checkInput();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,8 +149,8 @@ bool Input::discoverGameController()
|
||||
if (SDL_IsGameController(i))
|
||||
numGamepads++;
|
||||
|
||||
printf("\nChecking for game controllers...\n");
|
||||
printf("%i joysticks found, %i are gamepads\n", nJoysticks, numGamepads);
|
||||
printf("** Checking for game controllers ...\n");
|
||||
printf("%i joysticks found, %i are gamepads\n\n", nJoysticks, numGamepads);
|
||||
|
||||
if (numGamepads > 0)
|
||||
{
|
||||
|
||||
@@ -61,7 +61,7 @@ bool Map::load(std::string file_path)
|
||||
if (file.good())
|
||||
{
|
||||
// Procesa el fichero linea a linea
|
||||
printf("Reading file %s\n", filename.c_str());
|
||||
printf("Reading file %s\n\n", filename.c_str());
|
||||
while (std::getline(file, line))
|
||||
{
|
||||
// Si la linea contiene el texto [tilemap] se realiza el proceso de carga del fichero tmx
|
||||
|
||||
@@ -300,7 +300,7 @@ void Player::move()
|
||||
// Dejarlo alineado con la plataforma
|
||||
state = standing;
|
||||
vy = 0.0f;
|
||||
y = -h + map->getActorCollider(hookedOnMovingPlatform).y;
|
||||
y = map->getActorCollider(hookedOnMovingPlatform).y - h;
|
||||
x += map->getActorIncX(hookedOnMovingPlatform);
|
||||
isOnMovingPlatform();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user