24 lines
622 B
C++
24 lines
622 B
C++
#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;
|
|
unsigned long frameSince = 0;
|
|
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
|