浏览代码

Fixed Pause/Step Debug Feature colliding with game pause.

/main
Thomas ICHÉ 5 年前
当前提交
9d72247f
共有 1 个文件被更改,包括 12 次插入21 次删除
  1. 33
      Assets/Scripts/Debug/FPSManager.cs

33
Assets/Scripts/Debug/FPSManager.cs


if (MillisecondCounter != null)
MillisecondCounter.text = $"{((dt * 1000).ToString("F2"))}ms.";
}
if(paused)
{
if(step)
if (paused && step)
Time.timeScale = 1.0f;
Time.timeScale = 0.0f;
else
if (Input.GetKeyDown(PauseKey))
Time.timeScale = 0.0f;
paused = !paused;
Time.timeScale = paused? 0.0f : 1.0f;
}
else if (Input.GetKeyDown(StepKey))
{
paused = true;
step = true;
Time.timeScale = 1.0f;
}
else
{
Time.timeScale = 1.0f;
}
if (Input.GetKeyDown(PauseKey))
{
paused = !paused;
}
else if (Input.GetKeyDown(StepKey))
{
paused = true;
step = true;
}
}

正在加载...
取消
保存