2019-06-05 04:25:40 +00:00
|
|
|
#pragma once
|
2019-05-29 22:49:54 +00:00
|
|
|
|
|
|
|
#include "Effect.h"
|
|
|
|
#include "prototypes.h"
|
|
|
|
#include "my_fastled.h"
|
2019-06-05 04:25:40 +00:00
|
|
|
#include "Animation.h"
|
2019-05-29 22:49:54 +00:00
|
|
|
|
|
|
|
class AnimationEffect : public Effect {
|
2019-06-07 04:24:16 +00:00
|
|
|
private:
|
2019-06-05 04:25:40 +00:00
|
|
|
Animation *animation;
|
|
|
|
CRGB *bg_color;
|
|
|
|
uint16_t xOffset;
|
|
|
|
uint16_t yOffset;
|
2019-06-07 04:24:16 +00:00
|
|
|
public:
|
2019-06-18 16:10:58 +00:00
|
|
|
AnimationEffect(const char* name) : AnimationEffect(name, new CRGB(0x000000), 0, 0) {}
|
|
|
|
AnimationEffect(const char* name, CRGB* background_color) : AnimationEffect(name, background_color, 0, 0) {}
|
|
|
|
AnimationEffect(const char* name, CRGB* bg_color, int x, int y);
|
|
|
|
~AnimationEffect();
|
2019-05-29 22:49:54 +00:00
|
|
|
void loop();
|
|
|
|
};
|