hairparticle fade fix

This commit is contained in:
Turanszki Janos
2019-11-10 10:01:23 +00:00
parent b8addef21d
commit 83dee7d9db
10 changed files with 45 additions and 23 deletions
+8 -3
View File
@@ -76,9 +76,6 @@ void MainComponent::Initialize()
wiInitializer::InitializeComponentsAsync();
wiLua::GetGlobal()->RegisterObject(MainComponent_BindLua::className, "main", new MainComponent_BindLua(this));
wiLua::GetGlobal()->RunFile("startup.lua");
}
void MainComponent::ActivatePath(RenderPath* component, float fadeSeconds, wiColor fadeColor)
@@ -122,6 +119,14 @@ void MainComponent::Run()
return;
}
static bool startup_script = false;
if (!startup_script)
{
startup_script = true;
wiLua::GetGlobal()->RegisterObject(MainComponent_BindLua::className, "main", new MainComponent_BindLua(this));
wiLua::GetGlobal()->RunFile("startup.lua");
}
wiProfiler::BeginFrame();
deltaTime = float(std::max(0.0, timer.elapsed() / 1000.0));