start fighting game sample script

This commit is contained in:
turanszkij
2019-04-18 00:14:13 +01:00
parent 673e193d44
commit 655826ffbe
14 changed files with 491 additions and 3 deletions
+8 -1
View File
@@ -123,7 +123,14 @@ void MainComponent::Run()
wiProfiler::BeginFrame();
wiProfiler::BeginRange("CPU Frame", wiProfiler::DOMAIN_CPU);
deltaTime = float(max(0, timer.elapsed() / 1000.0));
if (framerate_lock)
{
deltaTime = 1.0f / targetFrameRate;
}
else
{
deltaTime = float(max(0, timer.elapsed() / 1000.0));
}
timer.record();
if (wiWindowRegistration::IsWindowActive())