Añadida la animación de morir

This commit is contained in:
2022-09-24 00:03:05 +02:00
parent e18db352e0
commit 330185720d
7 changed files with 133 additions and 30 deletions

View File

@@ -34,6 +34,16 @@ enum e_floor
f_platform
};
struct player_t
{
float x;
float y;
float vx;
float vy;
e_state state;
SDL_RendererFlip flip;
};
// The player
class Player
{
@@ -111,7 +121,7 @@ private:
public:
// Constructor
Player(SDL_Renderer *renderer, Asset *asset, Input *input, Map *map, Debug *debug, int *diamonds);
Player(player_t player, SDL_Renderer *renderer, Asset *asset, Input *input, Map *map, Debug *debug, int *diamonds);
// Destructor
~Player();
@@ -148,6 +158,9 @@ public:
// Obtiene el estado de vida del jugador
e_living getLivingState();
// Obtiene algunos parametros del jugador
player_t getSpawnParams();
};
#endif