2019-10-24 04:33:16 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Effect.h"
|
|
|
|
#include "my_fastled.h"
|
|
|
|
|
|
|
|
class LightspeedEffectStar {
|
|
|
|
private:
|
|
|
|
uint16_t _angle;
|
2019-11-03 12:56:07 +00:00
|
|
|
accum88 _distance;
|
2019-10-24 04:33:16 +00:00
|
|
|
uint16_t _speed;
|
|
|
|
uint16_t _target;
|
|
|
|
uint8_t _saturation;
|
|
|
|
void _init();
|
|
|
|
public:
|
|
|
|
LightspeedEffectStar();
|
|
|
|
void loop(Window* win);
|
|
|
|
};
|
|
|
|
|
|
|
|
class LightspeedEffect : public Effect {
|
|
|
|
private:
|
|
|
|
LightspeedEffectStar* _stars;
|
|
|
|
uint8_t _count;
|
|
|
|
void _init();
|
|
|
|
void _delete();
|
|
|
|
public:
|
|
|
|
LightspeedEffect();
|
|
|
|
~LightspeedEffect();
|
|
|
|
void loop(uint16_t ms);
|
|
|
|
boolean can_be_shown_with_clock();
|
|
|
|
String get_name() override { return "lightspeed"; }
|
|
|
|
};
|
|
|
|
|