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;
|
2019-09-25 16:11:03 +00:00
|
|
|
const char* name;
|
2019-06-05 04:25:40 +00:00
|
|
|
uint16_t xOffset;
|
|
|
|
uint16_t yOffset;
|
2019-06-07 04:24:16 +00:00
|
|
|
public:
|
2019-06-19 20:16:06 +00:00
|
|
|
AnimationEffect(const char* name) : AnimationEffect(name, 0x000000, 0, 0) {}
|
|
|
|
AnimationEffect(const char* name, uint32_t bg_color) : AnimationEffect(name, bg_color, 0, 0) {}
|
|
|
|
AnimationEffect(const char* name, uint32_t bg_color, int x, int y);
|
2019-06-18 16:10:58 +00:00
|
|
|
~AnimationEffect();
|
2019-06-19 20:16:06 +00:00
|
|
|
AnimationEffect* setFgColor(uint32_t c);
|
2019-05-29 22:49:54 +00:00
|
|
|
void loop();
|
2019-09-25 16:11:03 +00:00
|
|
|
String get_name() override;
|
2019-05-29 22:49:54 +00:00
|
|
|
};
|