mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 20:41:49 +00:00
add: lua func
This commit is contained in:
parent
2f2d6a69e8
commit
7a1c035f01
7 changed files with 114 additions and 4 deletions
|
|
@ -44,7 +44,7 @@ World::~World(){
|
|||
}
|
||||
|
||||
void World::updateTimers(float delta) {
|
||||
daytime += delta * daytimeSpeed;
|
||||
daytime += delta * daytimeSpeed * factorSpeedTime;
|
||||
daytime = fmod(daytime, 1.0f);
|
||||
totalTime += delta;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,8 +42,11 @@ public:
|
|||
/// 0.5 - is noon
|
||||
float daytime = timeutil::time_value(10, 00, 00);
|
||||
|
||||
// factor speed time
|
||||
float factorSpeedTime = 1.0f;
|
||||
|
||||
// looking bad
|
||||
float daytimeSpeed = 1.0f/60.0f/24.0f;
|
||||
float daytimeSpeed = 0.000694444444444f; //1.0f/60.0f/24.0f;
|
||||
|
||||
/// @brief total time passed in the world (not depending on daytimeSpeed)
|
||||
double totalTime = 0.0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue