pitrix/include/effect_animation.h
Fabian Schlenz 382631d7d7 Effect#loop now gets the time since the last run of the loop in ms. This enables
the effects to show animations that stay fluid independent of the current frame rate.
2019-10-01 06:29:32 +02:00

23 lines
640 B
C++

#pragma once
#include "Effect.h"
#include "prototypes.h"
#include "my_fastled.h"
#include "Animation.h"
class AnimationEffect : public Effect {
private:
Animation *animation;
const char* name;
uint16_t xOffset;
uint16_t yOffset;
public:
AnimationEffect(const char* name) : AnimationEffect(name, 0x000000, 0, 0) {}
AnimationEffect(const char* name, uint32_t bg_color) : AnimationEffect(name, bg_color, 0, 0) {}
AnimationEffect(const char* name, uint32_t bg_color, int x, int y);
~AnimationEffect();
AnimationEffect* setFgColor(uint32_t c);
void loop(uint16_t ms);
String get_name() override;
};