added difficulty (speed and points)

This commit is contained in:
2021-08-28 19:51:32 +02:00
parent 914b9e4123
commit 502835453a
3 changed files with 60 additions and 26 deletions

View File

@@ -179,6 +179,7 @@ private:
Uint8 mLastEnemyDeploy; // Guarda cual ha sido la última formación desplegada para no repetir;
Uint8 mEnemyDeployCounter; // Cuando se lanza una formación, se le da un valor y no sale otra hasta que llegue a cero
float mEnemySpeed; // Velocidad a la que se mueven los enemigos
float mDefaultEnemySpeed; // Velocidad base de los enemigos, sin incrementar
effect_t mEffect; // Variable para gestionar los efectos visuales
helper_t mHelper; // Variable para gestionar las ayudas
bool mPowerBallEnabled; // Indica si hay una powerball ya activa
@@ -188,6 +189,8 @@ private:
float mSin[360]; // Vector con los valores del seno para 360 grados
bool mGameCompleted; // Indica si se ha completado la partida, llegando al final de la ultima pantalla
int mGameCompletedCounter; // Contador para el tramo final, cuando se ha completado la partida y ya no aparecen más enemigos
int mDifficulty; // Dificultad del juego
float mDifficultyScoreMultiplier; // Multiplicador de puntos en función de la dificultad
struct demo_t
{
@@ -210,7 +213,7 @@ private:
public:
// Constructor
Game(int numPlayers, SDL_Renderer *renderer, std::string *filelist, Lang *lang, Input *input1, Input *input2, bool demo);
Game(int numPlayers, SDL_Renderer *renderer, std::string *filelist, Lang *lang, Input *input1, Input *input2, bool demo, int difficulty);
// Destructor
~Game();