![]() |
SUPER Space invader : Turbo edition DX - VS GOD 1.0.0
A simple space invader ripoff
|
player data structure More...
#include <player.h>
Public Member Functions | |
| bool | hasDeathAnimation () const |
| Tells if the player has a death animation ongoing. More... | |
| bool | isEliminated () const |
| Tells if the player is eliminated (no more lives) More... | |
| bool | isPlaying () const |
| Tells if the player is playing, or has a death animation/is eliminated. More... | |
| void | damage () |
| Damage the player (no precondition on existing state) More... | |
Public Attributes | |
| unsigned | lives = 3 |
| player life points More... | |
| unsigned | x |
| x coordinate of the player More... | |
| unsigned | id |
| player's unique identidier More... | |
| unsigned | score =0 |
| player's personal score More... | |
| unsigned | deathAnimCounter =0 |
| counter used for the death animation of players undefined once the player is eliminated More... | |
| unsigned | fireCooldown =0 |
| player's shooting cooldown More... | |
| void Player::damage | ( | ) |
Damage the player (no precondition on existing state)
Definition at line 26 of file player.cpp.
| bool Player::hasDeathAnimation | ( | ) | const |
Tells if the player has a death animation ongoing.
Definition at line 18 of file player.cpp.

| bool Player::isEliminated | ( | ) | const |
Tells if the player is eliminated (no more lives)
Definition at line 22 of file player.cpp.

| bool Player::isPlaying | ( | ) | const |
Tells if the player is playing, or has a death animation/is eliminated.
Definition at line 14 of file player.cpp.

| unsigned Player::deathAnimCounter =0 |