Trabajando con las rampas

This commit is contained in:
2022-09-06 14:03:12 +02:00
parent 189b933622
commit 066a9ab811
3 changed files with 15 additions and 6 deletions

View File

@@ -3,13 +3,14 @@
#include <sstream>
// Constructor
Player::Player(player_t ini, std::string tileset, std::string animation, SDL_Renderer *renderer, Asset *asset, Input *input, Room *room)
Player::Player(player_t ini, std::string tileset, std::string animation, SDL_Renderer *renderer, Asset *asset, Input *input, Room *room, Debug *debug)
{
// Obten punteros a objetos
this->asset = asset;
this->renderer = renderer;
this->input = input;
this->room = room;
this->debug = debug;
// Crea objetos
texture = new LTexture(renderer, asset->get(tileset));
@@ -241,6 +242,7 @@ void Player::move()
else
{
tile_e slope = checkSlopes();
debug->add("SLOPE = " + std::to_string(slope));
if (slope != t_empty)
{ // Cuesta hacia la derecha
if (slope == t_slope_r)