G.U.L.L.S. rebuilt to use PlatformIO
This commit is contained in:
32
include/RicochetMatrix.h
Normal file
32
include/RicochetMatrix.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef RICOCHETMATRIX_H
|
||||
#define RICOCHETMATRIX_H
|
||||
|
||||
#include "MatrixAnimation.h"
|
||||
#include "RicochetHelper.h"
|
||||
|
||||
class RicochetMatrix : public MatrixAnimation {
|
||||
public:
|
||||
RicochetMatrix(LEDHAL2D* _matrix, char* _refName, long _updateTime, uint16_t _numBalls,
|
||||
CRGB* _colors, uint8_t _numColors) : MatrixAnimation(_matrix, _refName, _updateTime),
|
||||
numBalls(_numBalls), colors(new CRGB[_numColors]), numColors(_numColors),
|
||||
balls(new RicochetHelper*[_numBalls]) {
|
||||
for(uint8_t i = 0; i < _numColors; i++) {
|
||||
colors[i] = _colors[i];
|
||||
}
|
||||
}
|
||||
virtual ~RicochetMatrix() { delete[] colors; delete[] balls; };
|
||||
|
||||
void initialize();
|
||||
void execute();
|
||||
private:
|
||||
uint16_t
|
||||
numBalls;
|
||||
CRGB*
|
||||
colors;
|
||||
uint8_t
|
||||
numColors;
|
||||
RicochetHelper**
|
||||
balls;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user