pitrix/include/effect_animation.h

23 lines
625 B
C
Raw Normal View History

#pragma once
#include "Effect.h"
#include "prototypes.h"
#include "my_fastled.h"
#include "Animation.h"
class AnimationEffect : public Effect {
2019-06-07 04:24:16 +00:00
private:
Animation *animation;
AnimationData *animation_data;
CRGB *bg_color;
uint16_t xOffset;
uint16_t yOffset;
2019-06-07 04:24:16 +00:00
public:
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();
void loop();
};