SUPER Space invader : Turbo edition DX - VS GOD
1.0.0
A simple space invader ripoff
player.cpp
Go to the documentation of this file.
1
12
#include "
player.h
"
13
14
bool
Player::isPlaying
()
const
{
15
return
!
isEliminated
() && !
hasDeathAnimation
();
16
}
17
18
bool
Player::hasDeathAnimation
()
const
{
19
return
deathAnimCounter
!=0;
20
}
21
22
bool
Player::isEliminated
()
const
{
23
return
lives
== 0;
24
}
25
26
void
Player::damage
() {
27
--
lives
;
28
deathAnimCounter
= 1;
29
}
player.h
player data storage
Player::isPlaying
bool isPlaying() const
Definition:
player.cpp:14
Player::damage
void damage()
Definition:
player.cpp:26
Player::deathAnimCounter
unsigned deathAnimCounter
counter used for the death animation of players undefined once the player is eliminated
Definition:
player.h:45
Player::hasDeathAnimation
bool hasDeathAnimation() const
Definition:
player.cpp:18
Player::isEliminated
bool isEliminated() const
Definition:
player.cpp:22
Player::lives
unsigned lives
player life points
Definition:
player.h:24
src
player.cpp
Generated by
1.9.3