21 lines
345 B
C++
21 lines
345 B
C++
// src/game/animation.h
|
|
#pragma once
|
|
#include "mbed.h"
|
|
|
|
constexpr auto ANIMATION_TICK = 170ms;
|
|
|
|
class AnimationController {
|
|
private:
|
|
Timer anim_timer;
|
|
int shift = 0;
|
|
|
|
public:
|
|
AnimationController();
|
|
|
|
// Update animation, returns true if redraw needed
|
|
bool tick(int speed);
|
|
|
|
// Getters
|
|
int get_shift() const { return shift; }
|
|
};
|