mirror of
https://github.com/originalnicodr/CinematicUnityExplorer.git
synced 2026-10-11 01:48:07 +08:00
Modified the TimeScaleController to work in tandem with UnityExplorer's native time scale control.
This commit is contained in:
1 parent
f0b594fd30
commit
ef4401fac0
3 files changed
+17
-12
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user