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();
|
||||
}
|
||||
|
||||
2
todo.md
2
todo.md
@@ -1,5 +1,5 @@
|
||||
## TAREAS
|
||||
(A) Plataformas moviles verticales: se ha de enganchar a la vy para no verse afectado por la gravedad
|
||||
(A) Plataformas moviles verticales: se ha de enganchar a la vy para no verse afectado por la gravedad {cm:2022-08-29}
|
||||
(A) Plataformas moviles horizontales: que no te empujen
|
||||
(B) Plantearse hasta cuanto puede estar fuera el personaje de una plataforma. Ahora mismo con un pixel se aguanta dentro
|
||||
(A) Colisiones más alla del mapa. Si al otro lado del mapa hay una pared, ahora mismo hace cosas raras
|
||||
|
||||
Reference in New Issue
Block a user