Modified the TimeScaleController to work in tandem with UnityExplorer's native time scale control.

This commit is contained in:
originalnicodr committed 2023-02-16 19:21:44 -03:00
1 parent f0b594fd30
commit ef4401fac0
3 files changed
+17 -12

No files matched your search

+7 -6
View File
@@ -78,7 +78,7 @@ namespace UnityExplorer
public TimeScaleController(System.IntPtr ptr) : base(ptr) { }
#endif
bool pause;
public bool pause;
bool settingTimeScale;
internal static void Setup()
@@ -96,12 +96,13 @@ namespace UnityExplorer
public void Update()
{
if (InputManager.GetKeyDown(KeyCode.Pause))
{
pause = !pause;
if (pause)
SetTimeScale(0f);
else
SetTimeScale(1f);
if (pause)
SetTimeScale(0f);
else
SetTimeScale(1f);
}
}
void SetTimeScale(float time)