[Updated] Code for use with WASM, [TODO] Make enemy gun follow player, spawn bullets from tip of the barrel

This commit is contained in:
Ninjaws
2024-12-17 23:15:26 +01:00
parent 2400b0500a
commit d740e1a167
25 changed files with 371 additions and 438 deletions
+5
View File
@@ -81,6 +81,10 @@ public:
this->health = std::max(health - damage, 0);
}
bool isFinishReached() {
return this->finishReached;
}
protected:
private:
TextureWrapper texture;
@@ -113,6 +117,7 @@ private:
uint8_t health; // Current health of the player
uint8_t max_health = 10; // Max health of the player
bool gainedPowerup = false;
bool finishReached = false;
void applyGravity();
void movement();