fix: replaced 1.0 with GetFrameTime when calling SceneTick
This commit is contained in:
parent
bfa75d1744
commit
10bd6ae727
|
@ -14,6 +14,7 @@ void InitializeRaylibContext() {
|
||||||
InitWindow(1280, 800, "FOGD Engine");
|
InitWindow(1280, 800, "FOGD Engine");
|
||||||
if(!IsWindowFullscreen())
|
if(!IsWindowFullscreen())
|
||||||
ToggleFullscreen();
|
ToggleFullscreen();
|
||||||
|
SetTargetFPS(120);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RunGame(Scene *initial_scene) {
|
void RunGame(Scene *initial_scene) {
|
||||||
|
@ -22,7 +23,7 @@ void RunGame(Scene *initial_scene) {
|
||||||
ASSERT_RETURN(GetMainScene() != NULL,, "RunGame: Initial scene cannot be NULL.");
|
ASSERT_RETURN(GetMainScene() != NULL,, "RunGame: Initial scene cannot be NULL.");
|
||||||
// Main update loop
|
// Main update loop
|
||||||
while (!WindowShouldClose()) {
|
while (!WindowShouldClose()) {
|
||||||
SceneTick(GetMainScene(), 1.0);
|
SceneTick(GetMainScene(), GetFrameTime());
|
||||||
RenderNextFrame();
|
RenderNextFrame();
|
||||||
}
|
}
|
||||||
ShutDown();
|
ShutDown();
|
||||||
|
|
Loading…
Reference in a new issue