0
0
mirror of https://github.com/Nimac0/SDL_Minigame synced 2026-01-12 07:53:43 +00:00
SDL_Minigame/include/PickupComponent.h
Nimac0 325f6e8e8d ref: powerup component now pickup component, assetmanager removed
assetmanager was redundant therefore any traces and usages were removed
2025-03-22 12:45:28 +01:00

20 lines
426 B
C++

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