Re-organized Animation code to move from multiple different constructors to one constructor and a handfull of setters for options.

This commit is contained in:
2019-06-07 06:07:29 +02:00
parent 560b71425d
commit a821985479
3 changed files with 58 additions and 39 deletions

View File

@ -9,7 +9,9 @@ AnimationEffect::AnimationEffect(AnimationData* anim, CRGB* bg, int x, int y) {
}
void AnimationEffect::start() {
this->animation = new Animation(this->animation_data, this->bg_color, this->xOffset, this->yOffset);
this->animation = new Animation(this->animation_data);
this->animation->setBgColor(this->bg_color);
this->animation->setOffsets(this->xOffset, this->yOffset);
}
void AnimationEffect::stop() {