Remove all old code
This commit is contained in:
25
examples/PoolBox/application/old/Objects/paco.cpp
Normal file
25
examples/PoolBox/application/old/Objects/paco.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
#include "paco.hpp"
|
||||
|
||||
namespace object {
|
||||
const GPU::Color24 Paco :: Colors[] = {GPU::Color24::Red(), GPU::Color24::Green(), GPU::Color24::Blue(), GPU::Color24::Yellow()};
|
||||
|
||||
void Paco :: setup() {
|
||||
this->timer.reset();
|
||||
// This should only work on elements that are linkable - but it didn't
|
||||
this->tex_page.concat(this->sprite);
|
||||
}
|
||||
|
||||
void 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();
|
||||
}
|
||||
}
|
||||
|
||||
void Paco :: render() {
|
||||
this->sprite->color = Paco::Colors[this->color_idx];
|
||||
GPU::render(this->tex_page);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user