pitrix/include/effect_animation.h

23 lines
629 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 {
private:
Animation *animation;
AnimationData *animation_data;
CRGB *bg_color;
uint16_t xOffset;
uint16_t yOffset;
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();
};