mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
move class Clock to a separate unit
This commit is contained in:
parent
fbced2504e
commit
eedce588b1
4 changed files with 98 additions and 76 deletions
24
src/util/Clock.hpp
Normal file
24
src/util/Clock.hpp
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#ifndef UTIL_CLOCK_HPP_
|
||||
#define UTIL_CLOCK_HPP_
|
||||
|
||||
namespace util {
|
||||
class Clock {
|
||||
int tickRate;
|
||||
int tickParts;
|
||||
|
||||
float tickTimer = 0.0f;
|
||||
int tickId = 0;
|
||||
int tickPartsUndone = 0;
|
||||
public:
|
||||
Clock(int tickRate, int tickParts);
|
||||
|
||||
bool update(float delta);
|
||||
|
||||
int getParts() const;
|
||||
int getPart() const;
|
||||
int getTickRate() const;
|
||||
int getTickId() const;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // UTIL_CLOCK_HPP_
|
||||
Loading…
Add table
Add a link
Reference in a new issue