changing the way Time works
This commit is contained in:
@@ -10,17 +10,17 @@ namespace OpenEngine {
|
||||
Time(const Time&) = delete; // No copy constructor
|
||||
Time& operator=(const Time&) = delete;
|
||||
|
||||
void Update();
|
||||
static void Update();
|
||||
|
||||
static Time& Get()
|
||||
static void Init()
|
||||
{
|
||||
if (instance == nullptr)
|
||||
instance.reset(new Time);
|
||||
|
||||
return *instance;
|
||||
}
|
||||
|
||||
double DeltaTime() const { return delta_time.count(); };
|
||||
static double DeltaTime() {
|
||||
return instance->delta_time.count();
|
||||
};
|
||||
|
||||
private:
|
||||
Time() {};
|
||||
|
||||
Reference in New Issue
Block a user