超大量的更新 修复很多问题,gameplay特效初步
This commit is contained in:
@@ -46,6 +46,9 @@ public class BgmUiBinder : MonoBehaviour
|
||||
public bool forceHideOnSceneLoad = true;
|
||||
public string lobbySceneName = "UI_UI";
|
||||
public string gameplaySceneName = "gamePlay_gamePlay";
|
||||
[Tooltip("Main menu scene name where spectrum should be hidden.")]
|
||||
public string mainSceneName = "Main_main";
|
||||
public bool hideSpectrumInMainScene = true;
|
||||
public float musicPicFadeDuration = 0.3f;
|
||||
public bool useUnscaledTime = true;
|
||||
|
||||
@@ -663,6 +666,9 @@ public class BgmUiBinder : MonoBehaviour
|
||||
if (viz != null)
|
||||
viz.enabled = true;
|
||||
CleanupSpectrumRoots(false);
|
||||
|
||||
// If this scene should not show spectrum (e.g. gameplay or main menu), hide after ensuring.
|
||||
HideSpectrumInGameplay(SceneManager.GetActiveScene().name);
|
||||
}
|
||||
|
||||
private void EnsureMusicPicCanvas()
|
||||
@@ -867,8 +873,9 @@ public class BgmUiBinder : MonoBehaviour
|
||||
|
||||
private void HideSpectrumInGameplay(string sceneName)
|
||||
{
|
||||
if (sceneName != gameplaySceneName)
|
||||
return;
|
||||
bool shouldHide = sceneName == gameplaySceneName ||
|
||||
(hideSpectrumInMainScene && sceneName == mainSceneName);
|
||||
if (!shouldHide) return;
|
||||
|
||||
var all = Resources.FindObjectsOfTypeAll<RectTransform>();
|
||||
for (int i = 0; i < all.Length; i++)
|
||||
@@ -938,4 +945,3 @@ public class BgmUiBinder : MonoBehaviour
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user