A 2D tile-based sandbox game.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Timer.h 202B

1234567891011121314151617
  1. #pragma once
  2. #include <string>
  3. namespace Swan {
  4. class Timer {
  5. public:
  6. void tick(float dt) { time_ += dt; }
  7. void reset() { time_ = 0; }
  8. bool periodic(float secs);
  9. private:
  10. float time_ = 0;
  11. };
  12. }