2修
This commit is contained in:
@@ -67,6 +67,11 @@ public class GameManager : MonoBehaviour
|
||||
[Tooltip("Delay in seconds before starting the black mask fade out. Configure in inspector.")]
|
||||
public float blackMaskFadeStartDelay = 1.5f;
|
||||
|
||||
[Header("Gameplay Prewarm")]
|
||||
[SerializeField] private int judgePopupPrewarmPerPrefab = 5;
|
||||
[SerializeField] private int trackHitParticlePrewarmCount = 24;
|
||||
[SerializeField] private int instantNumberPrewarmPerPrefab = 18;
|
||||
|
||||
private bool pauseSubscribed = false;
|
||||
private bool musicWasPlayingBeforePause = false;
|
||||
|
||||
@@ -510,11 +515,13 @@ public class GameManager : MonoBehaviour
|
||||
|
||||
var judgeFx = Animation_GenerateJudgementSituationPrefab.Instance
|
||||
?? SceneObjectLookupCache.FindAny<Animation_GenerateJudgementSituationPrefab>();
|
||||
judgeFx?.PrewarmJudgePrefabs(5);
|
||||
judgeFx?.PrewarmJudgePrefabs(judgePopupPrewarmPerPrefab);
|
||||
|
||||
var trackHitFx = TrackJudgeHitEffectController.Instance
|
||||
?? SceneObjectLookupCache.FindAny<TrackJudgeHitEffectController>();
|
||||
trackHitFx?.PrewarmTrackParticles(10);
|
||||
trackHitFx?.PrewarmTrackParticles(trackHitParticlePrewarmCount);
|
||||
|
||||
iNumberPrefabController.PrewarmRuntime(instantNumberPrewarmPerPrefab);
|
||||
|
||||
var fxEvent = effectEventController.Instance ?? SceneObjectLookupCache.FindAny<effectEventController>();
|
||||
if (fxEvent != null && fxEvent.isActiveAndEnabled)
|
||||
@@ -536,18 +543,10 @@ public class GameManager : MonoBehaviour
|
||||
// Detect Space or yellow note key to request start (only before gameplay starts)
|
||||
if (!startRequested)
|
||||
{
|
||||
KeyCode yellowKey = KeyBindingManager.GetKeyForColor("yellow");
|
||||
// Check Space key
|
||||
if (Input.GetKeyDown(KeyCode.Space))
|
||||
if (IsYellowStartKeyDown())
|
||||
{
|
||||
RequestStart();
|
||||
}
|
||||
// Check yellow track key from key binding manager
|
||||
else if (yellowKey != KeyCode.None && Input.GetKeyDown(yellowKey))
|
||||
{
|
||||
if (yellowKey == KeyCode.Space) return;
|
||||
else RequestStart();
|
||||
}
|
||||
|
||||
// Check Escape key to trigger return to selecting page (only before gameplay starts and allowed)
|
||||
if (allowEscapeReturn && Input.GetKeyDown(KeyCode.Escape))
|
||||
@@ -558,6 +557,17 @@ public class GameManager : MonoBehaviour
|
||||
// Once startRequested is true, Escape is disabled and gameplay begins countdown
|
||||
}
|
||||
|
||||
private bool IsYellowStartKeyDown()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Space)) return true;
|
||||
|
||||
KeyCode yellowKey = KeyBindingManager.GetKeyForColor("yellow");
|
||||
if (yellowKey != KeyCode.None && yellowKey != KeyCode.Space && Input.GetKeyDown(yellowKey)) return true;
|
||||
|
||||
KeyCode secondaryYellowKey = KeyBindingManager.GetSecondaryKeyForTrack3();
|
||||
return secondaryYellowKey != KeyCode.None && secondaryYellowKey != KeyCode.Space && Input.GetKeyDown(secondaryYellowKey);
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
RecordTotalPlayTime();
|
||||
@@ -1281,11 +1291,8 @@ public class GameManager : MonoBehaviour
|
||||
PauseManager.Instance?.Pause(true);
|
||||
UpdateStatusOnConsole("Paused: press Space to start playback");
|
||||
|
||||
// Determine yellow track key from key binding manager
|
||||
KeyCode yellowKey = KeyBindingManager.GetKeyForColor("yellow");
|
||||
|
||||
// Wait for start request: Space, yellow key, or UI button
|
||||
while (!startRequested && !Input.GetKeyDown(KeyCode.Space) && (yellowKey == KeyCode.None || !Input.GetKeyDown(yellowKey)))
|
||||
while (!startRequested && !IsYellowStartKeyDown())
|
||||
{
|
||||
yield return null;
|
||||
}
|
||||
@@ -1357,11 +1364,8 @@ public class GameManager : MonoBehaviour
|
||||
PauseManager.Instance?.Pause(true);
|
||||
UpdateStatusOnConsole("Paused: press Space to start playback");
|
||||
|
||||
// Determine yellow track key from key binding manager
|
||||
KeyCode yellowKey = KeyBindingManager.GetKeyForColor("yellow");
|
||||
|
||||
// Wait for start request: Space, yellow key, or UI button
|
||||
while (!startRequested && !Input.GetKeyDown(KeyCode.Space) && (yellowKey == KeyCode.None || !Input.GetKeyDown(yellowKey)))
|
||||
while (!startRequested && !IsYellowStartKeyDown())
|
||||
{
|
||||
yield return null;
|
||||
}
|
||||
@@ -1468,11 +1472,8 @@ public class GameManager : MonoBehaviour
|
||||
PauseManager.Instance?.Pause(true);
|
||||
UpdateStatusOnConsole("Paused: press Space to start playback");
|
||||
|
||||
// Determine yellow track key from key binding manager
|
||||
KeyCode yellowKey2 = KeyBindingManager.GetKeyForColor("yellow");
|
||||
|
||||
// Wait for start request: Space, yellow key, or UI button
|
||||
while (!startRequested && !Input.GetKeyDown(KeyCode.Space) && (yellowKey2 == KeyCode.None || !Input.GetKeyDown(yellowKey2)))
|
||||
while (!startRequested && !IsYellowStartKeyDown())
|
||||
{
|
||||
yield return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user