Component for items that can be picked up by players.
float _duration
Buff duration.
CollectibleType getCollectibleType() const
Get collectible type.
bool grantsBuff() const
Check if this grants a buff.
bool awardsScore() const
Check if this awards score.
Collectible(int scoreValue, bool isScoreType)
Constructor for score pickup.
bool restoresHealth() const
Check if this restores health.
CollectibleType _type
Type of collectible.
float getDuration() const
Get buff duration.
Collectible(int healthRestore)
Constructor for health pack.
~Collectible() override=default
BuffType _buffType
Buff granted (if applicable)
int _healthRestore
Health restored (if health pack)
Collectible(BuffType buffType, float duration, float value)
Constructor for buff-granting collectible.
int _scoreValue
Score points (if score pickup)
BuffType getBuffType() const
Get buff type (if applicable)
ComponentType getType() const override
Get the component type ID.
int getHealthRestore() const
Get health restore amount.
float getValue() const
Get buff value.
int getScoreValue() const
Get score value.
Base interface for all ECS components.
Maximum number of distinct component types supported by the Registry.
CollectibleType
Types of collectible items.
@ PowerUp
Temporary power-up (buffs)
@ HealthPack
Restores health.
@ Upgrade
Permanent upgrade.
BuffType
Types of buffs that can be applied to entities.
@ SpeedBoost
Increases movement speed.
std::size_t ComponentType
Type alias for component identification.