17class StatEffectsComponent :
public Component{
19 StatEffectsComponent() {};
20 ~StatEffectsComponent() {};
23 void update(uint_fast16_t diffTime)
override;
29 void addEffect(uint32_t duration, std::function<
void()> resetFunction);
32 std::vector<StatEffect> effects = {};
Struct to hold the duration, reset function and start time of a stat effect.
Definition StatEffectsComponent.h:11
std::function< void()> resetFunction
Function to reset the effect, will be called on expiry of duration.
Definition StatEffectsComponent.h:13
uint32_t duration
Duration of the effect in milliseconds.
Definition StatEffectsComponent.h:12