nitroes 2
This commit is contained in:
parent
a49a76f8ef
commit
abf896ce6d
@ -11,6 +11,7 @@ public:
|
|||||||
glm::mat4 modelMatrix;
|
glm::mat4 modelMatrix;
|
||||||
glm::mat4 initialModelMatrix;
|
glm::mat4 initialModelMatrix;
|
||||||
float healAmount = 10;
|
float healAmount = 10;
|
||||||
|
bool isCollected;
|
||||||
|
|
||||||
|
|
||||||
Nitro(glm::mat4 initialModelMatrix, float healAmount)
|
Nitro(glm::mat4 initialModelMatrix, float healAmount)
|
||||||
@ -18,14 +19,16 @@ public:
|
|||||||
modelMatrix(initialModelMatrix),
|
modelMatrix(initialModelMatrix),
|
||||||
initialModelMatrix(initialModelMatrix),
|
initialModelMatrix(initialModelMatrix),
|
||||||
healAmount(healAmount),
|
healAmount(healAmount),
|
||||||
|
isCollected(false),
|
||||||
GameEntity(1, 1, 0)
|
GameEntity(1, 1, 0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
virtual ~Nitro() = default;
|
virtual ~Nitro() = default;
|
||||||
|
|
||||||
virtual bool isAlive() const {
|
virtual bool isAlive() {
|
||||||
if (this->currentHP <= 0) {
|
if (this->currentHP <= 0) {
|
||||||
|
isCollected = true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -399,4 +399,7 @@ public:
|
|||||||
this->currentHP = this->currentHP + 3.f;
|
this->currentHP = this->currentHP + 3.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void turboBoost() {
|
||||||
|
this->turbo = this->turboMAX;
|
||||||
|
}
|
||||||
};
|
};
|
Loading…
Reference in New Issue
Block a user