some updates
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user