修了很多bug和增加功能,优化不少问题

This commit is contained in:
2026-02-28 06:59:22 +08:00
parent 508a40bba0
commit e11cc1da7a
345 changed files with 173803 additions and 69332 deletions
@@ -17,6 +17,9 @@ public class readyLetsGo : MonoBehaviour
public float startScale = 1.25f;
public float endScale = 0.8f;
[Header("Gameplay Track Intro")]
public GameplayTrackStartIntroAnimator gameplayTrackStartIntroAnimator;
private Coroutine sequenceCoroutine;
// Prevent re-entry / accidental double-play
@@ -58,6 +61,15 @@ public class readyLetsGo : MonoBehaviour
isPlaying = false;
lastPlayedTime = -10f;
playedOnce = false; // allow one play when player initiates
if (gameplayTrackStartIntroAnimator == null)
{
gameplayTrackStartIntroAnimator = FindAnyObjectByType<GameplayTrackStartIntroAnimator>();
if (gameplayTrackStartIntroAnimator == null)
{
gameplayTrackStartIntroAnimator = gameObject.AddComponent<GameplayTrackStartIntroAnimator>();
}
}
}
/// <summary>
@@ -93,6 +105,12 @@ public class readyLetsGo : MonoBehaviour
isPlaying = true;
lastPlayedTime = Time.unscaledTime;
if (gameplayTrackStartIntroAnimator != null)
{
gameplayTrackStartIntroAnimator.PlayIfNeeded();
}
sequenceCoroutine = StartCoroutine(PlaySequenceCoroutine());
}
@@ -251,5 +269,6 @@ public class readyLetsGo : MonoBehaviour
try { StopCoroutine(sequenceCoroutine); } catch { }
sequenceCoroutine = null;
}
}
}