|
|
|
|
|
|
|
|
|
|
namespace Unity.UIWidgets.engine { |
|
|
|
public class UIWidgetsGlobalSettings { |
|
|
|
private UIWidgetsGlobalSettings() {} |
|
|
|
|
|
|
|
static UIWidgetsGlobalSettings _instance = new UIWidgetsGlobalSettings(); |
|
|
|
Timer scheduleFrameTimer; |
|
|
|
public const int defaultMaxTargetFrameRate = 60; |
|
|
|
public const int defaultMinTargetFrameRate = 15; |
|
|
|
UIWidgetsGlobalSettings() { |
|
|
|
this.speedUpFrameRate = () => { this.defaultSpeedUp(); }; |
|
|
|
this.coolDownFrameRate = () => { this.defaultCoolDown(); }; |
|
|
|
} |
|
|
|
public Action speedUpFrameRate; |
|
|
|
public Action coolDownFrameRate; |
|
|
|
|
|
|
|
public virtual void speedUpFrameRate() { |
|
|
|
|
|
|
|
static UIWidgetsGlobalSettings _instance = new UIWidgetsGlobalSettings(); |
|
|
|
|
|
|
|
Timer scheduleFrameTimer; |
|
|
|
public const int defaultMaxTargetFrameRate = 60; |
|
|
|
public const int defaultMinTargetFrameRate = 15; |
|
|
|
|
|
|
|
void defaultSpeedUp() { |
|
|
|
public virtual void coolDownFrameRate() { |
|
|
|
void defaultCoolDown() { |
|
|
|
this.scheduleFrameTimer?.cancel(); |
|
|
|
this.scheduleFrameTimer = Window.instance.run( |
|
|
|
new TimeSpan(0, 0, 0, 0, 200), |
|
|
|