things
This commit is contained in:
parent
f50b9991a6
commit
1351e8fe93
@ -144,7 +144,7 @@ public:
|
||||
*/
|
||||
virtual void drawTorpedo(const Position& baseVector, unsigned width, const nsGraphics::RGBAcolor& color) const;
|
||||
|
||||
#define HEART_LENGTH 40
|
||||
#define HEART_LENGTH 64
|
||||
|
||||
/*!
|
||||
* @brief display a singular heart on screen
|
||||
|
@ -13,6 +13,12 @@
|
||||
#define ISPRESSED(ID, X) window.isPressed({confData.playerDefs[ID].keys.X, false})
|
||||
void Game::manageOnePlayer(playerID pID){
|
||||
Player& p = players[pID];
|
||||
if(p.hasDeathAnimation()) {
|
||||
++p.deathAnimCounter;
|
||||
if (p.deathAnimCounter == 75) {
|
||||
p.deathAnimCounter = 0;
|
||||
}
|
||||
}
|
||||
if(p.isEliminated())return;
|
||||
|
||||
if (ISPRESSED(pID, left)){
|
||||
@ -25,14 +31,7 @@ void Game::manageOnePlayer(playerID pID){
|
||||
}
|
||||
|
||||
|
||||
if(p.hasDeathAnimation()) {
|
||||
++p.deathAnimCounter;
|
||||
if (p.deathAnimCounter == 75) {
|
||||
p.deathAnimCounter = 0;
|
||||
}
|
||||
}else{
|
||||
if(p.isEliminated())return;
|
||||
|
||||
if(!p.hasDeathAnimation()) {
|
||||
if(p.fireCooldown==0) {
|
||||
if (ISPRESSED(pID, shoot)) {
|
||||
torpedos.emplace_back(p.x + confData.playersWidth / 2, pm->getScreenHeight() - PLAYER_HEIGHT, pID);
|
||||
|
Loading…
Reference in New Issue
Block a user