2019-05-29 22:49:54 +00:00
|
|
|
#ifndef effect_animation_H
|
|
|
|
#define effect_animation_H
|
|
|
|
|
|
|
|
#include "Effect.h"
|
|
|
|
#include "prototypes.h"
|
|
|
|
#include "my_fastled.h"
|
|
|
|
|
|
|
|
class AnimationEffect : public Effect {
|
|
|
|
private:
|
|
|
|
AnimationData *animation;
|
|
|
|
int frame = 0;
|
|
|
|
CRGB background_color;
|
|
|
|
int xOffset, yOffset;
|
2019-05-30 09:26:13 +00:00
|
|
|
unsigned long frameSince = 0;
|
2019-05-29 22:49:54 +00:00
|
|
|
public:
|
|
|
|
AnimationEffect(AnimationData *anim);
|
|
|
|
AnimationEffect(AnimationData *anim, CRGB background_color);
|
|
|
|
AnimationEffect(AnimationData *anim, CRGB bg_color, int x, int y);
|
|
|
|
void loop();
|
|
|
|
void set(int i, CRGB* color);
|
|
|
|
uint16_t frameDelay(AnimationData* animation, int frame);
|
|
|
|
};
|
|
|
|
#endif
|