| 20 | public: |
| 21 | explicit Animation(std::string_view path) : _drawable(path), _frameTime(), _frameIdx(), _animationSpeed(0.5 * (AnimationSpeedUnit)) {} |
| 22 | void draw(int x, int y) { _drawable.draw(_frameIdx, x, y); } |
| 23 | |
| 24 | void update(const std::chrono::duration<double> deltaTime) { |
| 25 | _frameTime += deltaTime.count(); |