浏览代码

Use constants.

/main
Yuncong Zhang 6 年前
当前提交
0988c4fa
共有 1 个文件被更改,包括 8 次插入5 次删除
  1. 13
      Runtime/editor/editor_window.cs

13
Runtime/editor/editor_window.cs


bool _alive;
Timer scheduleFrameTimer = null;
Timer scheduleFrameTimer;
const int maxTargetFrameRate = 60;
const int minTargetFrameRate = 15;
const int targetFrameRateAdaptStep = 10;
public bool alive {
get { return this._alive; }

if (regenerateLayerTree) {
this._regenerateLayerTree = true;
}
Application.targetFrameRate = 60;
Application.targetFrameRate = maxTargetFrameRate;
if (Application.targetFrameRate > 10)
Application.targetFrameRate -= 10;
if (Application.targetFrameRate > minTargetFrameRate)
Application.targetFrameRate -= targetFrameRateAdaptStep;
Application.targetFrameRate = 10;
Application.targetFrameRate = minTargetFrameRate;
this.scheduleFrameTimer.cancel();
this.scheduleFrameTimer = null;
}

正在加载...
取消
保存