|
|
|
|
|
|
|
|
|
|
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; |
|
|
|
} |
|
|
|