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 {
|
|
|
|
private:
|
2019-06-05 04:25:40 +00:00
|
|
|
Animation *animation;
|
|
|
|
AnimationData *animation_data;
|
|
|
|
CRGB *bg_color;
|
|
|
|
uint16_t xOffset;
|
|
|
|
uint16_t yOffset;
|
2019-05-29 22:49:54 +00:00
|
|
|
public:
|
2019-06-05 04:25:40 +00:00
|
|
|
AnimationEffect(AnimationData* anim) : AnimationEffect(anim, new CRGB(0x000000), 0, 0) {}
|
|
|
|
AnimationEffect(AnimationData* anim, CRGB* background_color) : AnimationEffect(anim, background_color, 0, 0) {}
|
|
|
|
AnimationEffect(AnimationData* anim, CRGB* bg_color, int x, int y);
|
|
|
|
void start();
|
|
|
|
void stop();
|
2019-05-29 22:49:54 +00:00
|
|
|
void loop();
|
|
|
|
};
|