some updates

This commit is contained in:
FloatGaming
2026-07-25 08:31:10 +08:00
parent af8a0b6810
commit 86351dbd2a
225 changed files with 46757 additions and 590 deletions
@@ -85,6 +85,14 @@ public class Animation_GenerateJudgementSituationPrefab : MonoBehaviour
public float trackSkillUiScaleMultiplier = 0.01f;
public int trackSkillSortingOrder = 9000;
[Header("Track Skill Burst Stagger")]
[Tooltip("If multiple track-skill popups spawn within this time window, increase later popups' Y launch speed to reduce overlap.")]
public float trackSkillBurstWindow = 0.08f;
[Tooltip("Extra jump force added per near-simultaneous popup.")]
public float trackSkillBurstJumpForceStep = 0.65f;
[Tooltip("Maximum burst step applied to later popups.")]
public int trackSkillBurstMaxStep = 3;
private Transform redSpawn;
private Transform greenSpawn;
private Transform yellowSpawn;
@@ -95,6 +103,8 @@ public class Animation_GenerateJudgementSituationPrefab : MonoBehaviour
private Coroutine prewarmJudgeCoroutine;
private readonly Dictionary<GameObject, Stack<GameObject>> judgePools = new Dictionary<GameObject, Stack<GameObject>>();
private readonly HashSet<GameObject> rentedJudges = new HashSet<GameObject>();
private float lastTrackSkillSpawnTime = -999f;
private int trackSkillBurstCount = 0;
private void Awake()
{
@@ -230,7 +240,33 @@ public class Animation_GenerateJudgementSituationPrefab : MonoBehaviour
ApplyTrackSkillScale(instance, finalScale);
instance.SetActive(true);
StartCoroutine(AnimatePopup(instance, trackSkillPopup, true));
PopupMotionSettings popupSettings = CreateTrackSkillPopupSettings();
StartCoroutine(AnimatePopup(instance, popupSettings, true));
}
private PopupMotionSettings CreateTrackSkillPopupSettings()
{
PopupMotionSettings popupSettings = new PopupMotionSettings
{
jumpForce = trackSkillPopup.jumpForce,
gravity = trackSkillPopup.gravity,
horizontalDriftRange = trackSkillPopup.horizontalDriftRange,
rotationRange = trackSkillPopup.rotationRange,
scalePunch = trackSkillPopup.scalePunch,
scalePunchDuration = trackSkillPopup.scalePunchDuration,
fadeInTime = trackSkillPopup.fadeInTime,
fadeOutStartTime = trackSkillPopup.fadeOutStartTime,
fadeOutDuration = trackSkillPopup.fadeOutDuration
};
float now = Time.unscaledTime;
float window = Mathf.Max(0f, trackSkillBurstWindow);
trackSkillBurstCount = now - lastTrackSkillSpawnTime <= window ? trackSkillBurstCount + 1 : 0;
lastTrackSkillSpawnTime = now;
int appliedStep = Mathf.Clamp(trackSkillBurstCount, 0, Mathf.Max(0, trackSkillBurstMaxStep));
popupSettings.jumpForce += Mathf.Max(0f, trackSkillBurstJumpForceStep) * appliedStep;
return popupSettings;
}
public void PrewarmJudgePrefabs(int perPrefab = 1)