0
0
mirror of https://github.com/Nimac0/SDL_Minigame synced 2026-01-12 07:53:43 +00:00
SDL_Minigame/include/PowerupComponent.h
Nimac0 eba3cdb6c8 doc: add docu
- datacomponent
- stateffectcomponent
- powerupcomponent
2025-01-28 22:33:07 +01:00

20 lines
407 B
C++

#pragma once
#include <functional>
#include "Component.h"
class PowerupComponent : public Component
{
public:
/**
* @brief Construct a new Powerup Component object
* @param func The function to be called when the powerup is picked up
*/
PowerupComponent(std::function<void (Entity*)> func);
~PowerupComponent() {};
void update() override;
private:
std::function<void (Entity*)> pickupFunc;
};