mirror of
https://github.com/Nimac0/SDL_Minigame
synced 2026-01-12 12:33:43 +00:00
20 lines
429 B
C++
20 lines
429 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(uint_fast16_t diffTime) override;
|
|
|
|
private:
|
|
std::function<void (Entity*)> pickupFunc;
|
|
}; |