Wiggle experiments

This commit is contained in:
Jaby
2023-12-01 15:25:36 -05:00
committed by Jaby
parent 7fa369a8bf
commit b3864a9cbc
5 changed files with 18 additions and 9 deletions

View File

@@ -9,13 +9,16 @@ namespace object {
this->tex_page.concat(this->sprite);
}
void Paco :: update() {
bool Paco :: update() {
if(this->timer.is_expired_for(325_ms)) {
static constexpr uint8_t LastIDX = (sizeof(Paco::Colors)/sizeof(Paco::Colors[0])) - 1;
this->color_idx = (this->color_idx == LastIDX) ? 0 : this->color_idx + 1;
this->timer.reset();
return true;
}
return false;
}
void Paco :: render() {