Primera implementacion de tiles atravesables. No funcionará si estan apilados
This commit is contained in:
@@ -99,7 +99,15 @@ void Game::render()
|
||||
void Game::checkInput()
|
||||
{
|
||||
if (input->checkInput(INPUT_BUTTON_2, REPEAT_FALSE))
|
||||
{
|
||||
debug = !debug;
|
||||
}
|
||||
|
||||
if (input->checkInput(INPUT_BUTTON_3, REPEAT_FALSE))
|
||||
{
|
||||
delete player;
|
||||
player = new Player(renderer, asset, input, map);
|
||||
}
|
||||
}
|
||||
|
||||
// Muestra información de depuración
|
||||
@@ -117,11 +125,17 @@ void Game::renderDebugInfo()
|
||||
debugText->write(0, line, text, -1);
|
||||
|
||||
text = "VY " + std::to_string(player->vy) + " " + std::to_string(player->jumpStrenght);
|
||||
debugText->write(0, line+=6, text, -1);
|
||||
debugText->write(0, line += 6, text, -1);
|
||||
|
||||
text = "VX " + std::to_string(player->vx);
|
||||
debugText->write(0, line+=6, text, -1);
|
||||
|
||||
debugText->write(0, line += 6, text, -1);
|
||||
|
||||
text = "jump_pressed " + std::to_string(player->jumpPressed);
|
||||
debugText->write(0, line+=6, text, -1);
|
||||
debugText->write(0, line += 6, text, -1);
|
||||
|
||||
text = "isOnFloor " + std::to_string(player->isOnFloor());
|
||||
debugText->write(0, line += 6, text, -1);
|
||||
|
||||
text = "getTile " + std::to_string(player->map->getTile(player->collider[0]));
|
||||
debugText->write(0, line += 6, text, -1);
|
||||
}
|
||||
Reference in New Issue
Block a user