From 57bb6c73c4b20c5eab167e5f1908d8666c505cb9 Mon Sep 17 00:00:00 2001 From: Firerise9402 <90978630+Firerise9402@users.noreply.github.com> Date: Mon, 9 Oct 2023 16:03:24 -0400 Subject: [PATCH] fixed the bugs --- Assets/Scripts/WindowController.cs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/Assets/Scripts/WindowController.cs b/Assets/Scripts/WindowController.cs index 7e941d679..56753abd0 100644 --- a/Assets/Scripts/WindowController.cs +++ b/Assets/Scripts/WindowController.cs @@ -48,8 +48,12 @@ namespace HeavenStudio #if UNITY_EDITOR return; #else - UniController.windowSize = (new Vector2(resX, resY)); - UniController.windowPosition = (new Vector2(x, y)); + if(Application.isEditor || !Editor.Editor.instance.fullscreen || !Conductor.instance.isPlaying) return; + if(PersistentDataManager.gameSettings.windowDanceEnable) + { + UniController.windowSize = (new Vector2(resX, resY)); + UniController.windowPosition = (new Vector2(x, y)); + } #endif } @@ -101,10 +105,7 @@ namespace HeavenStudio UpdateScale(); UpdatePan(); //SetShakeIntensity(); - if(PersistentDataManager.gameSettings.windowDanceEnable) - { - SetPosition(Convert.ToInt16(pan.x), Convert.ToInt16(pan.y), Convert.ToInt16(scale.x), Convert.ToInt16(scale.y)); - } + SetPosition(Convert.ToInt16(pan.x), Convert.ToInt16(pan.y), Convert.ToInt16(scale.x), Convert.ToInt16(scale.y)); } private void UpdatePan() @@ -213,11 +214,7 @@ namespace HeavenStudio pan = defaultPan; scale = defaultScale; shakeResult = defaultShake; - if(Application.isEditor) return; - if(PersistentDataManager.gameSettings.windowDanceEnable) - { - SetPosition(Convert.ToInt16(pan.x), Convert.ToInt16(pan.y), Convert.ToInt16(scale.x), Convert.ToInt16(scale.y)); - } + SetPosition(Convert.ToInt16(pan.x), Convert.ToInt16(pan.y), Convert.ToInt16(scale.x), Convert.ToInt16(scale.y)); } } } \ No newline at end of file