Acomodats els estats del jugador

El compte enrrere per a continuar ara ix al acabar la animació de morir
Afegit el estat "entering_name"
This commit is contained in:
2024-09-29 10:40:35 +02:00
parent 945eaa68e7
commit 8ce09d1355
9 changed files with 193 additions and 68 deletions

View File

@@ -1,10 +1,10 @@
#pragma once
#include <SDL2/SDL_rect.h> // for SDL_Rect
#include <SDL2/SDL_stdinc.h> // for Uint32
#include <string> // for string, basic_string
#include <vector> // for vector
#include "utils.h" // for circle_t
#include <SDL2/SDL_rect.h> // for SDL_Rect
#include <SDL2/SDL_stdinc.h> // for Uint32
#include <string> // for string, basic_string
#include <vector> // for vector
#include "utils.h" // for circle_t
class AnimatedSprite;
class Texture;
@@ -21,6 +21,9 @@ class Texture;
#define PLAYER_STATUS_PLAYING 0
#define PLAYER_STATUS_CONTINUE 1
#define PLAYER_STATUS_WAITING 2
#define PLAYER_STATUS_ENTERING_NAME 3
#define PLAYER_STATUS_DYING 4
#define PLAYER_STATUS_DIED 5
// Variables del jugador
#define PLAYER_INVULNERABLE_COUNTER 200
@@ -149,6 +152,15 @@ public:
// Indica si el jugador está esperando
bool isWaiting();
// Indica si el jugador está introduciendo su nombre
bool isEnteringName();
// Indica si el jugador está muriendose
bool isDying();
// Indica si el jugador ha terminado de morir
bool hasDied();
// Establece el estado del jugador en el juego
void setStatusPlaying(int value);