[Added] Jellies, healthpacks, ammopacks, powerups, [Updated] Gun rotation

This commit is contained in:
Ninjaws
2024-12-15 20:14:57 +01:00
parent de958b02e6
commit 5af531a08b
15 changed files with 564 additions and 155 deletions
+43
View File
@@ -0,0 +1,43 @@
#ifndef HEALTH_PACK_H
#define HEALTH_PACK_H
#include "raylib.h"
#include "services/AssetService.h"
#include "entities/TextureWrapper.h"
class HealthPack {
public:
HealthPack() {
this->object = TextureWrapper(AssetService::getInstance().getSprite(ESprite::HEALTHPACK),{32,32});
}
void logic(){
}
void draw() {
DrawTexture(object.getTexture(), object.getPosition().x, object.getPosition().y, WHITE);
}
int getHealAmount() {
return this->healAmount;
}
void setPickedUp(bool pickedUp) {
this->pickedUp = pickedUp;
}
bool hasBeenPickedUp() {
return this->pickedUp;
}
TextureWrapper& getObject() {
return this->object;
}
private:
TextureWrapper object;
unsigned int healAmount = 2; // Amount of health replenished by the pack
bool pickedUp; // When the player has picked up the pack
};
#endif