一些修复和优化
This commit is contained in:
@@ -86,6 +86,12 @@ public class NoteSpawner : MonoBehaviour
|
||||
// optional: constants for runtime clamping (kept for internal use)
|
||||
private const float SpeedMultiplierMin = 0.5f;
|
||||
private const float SpeedMultiplierMax = 2f;
|
||||
private const float FlowSpeedGlobalMultiplier = 1.5f;
|
||||
|
||||
public float EffectiveSpeedMultiplier
|
||||
{
|
||||
get { return Mathf.Clamp(speedMultiplier, SpeedMultiplierMin, SpeedMultiplierMax) * FlowSpeedGlobalMultiplier; }
|
||||
}
|
||||
|
||||
public NoteJudgeConfig judgeConfig; // Documentation text normalized.
|
||||
private Beatmap beatmap;
|
||||
@@ -264,7 +270,7 @@ public class NoteSpawner : MonoBehaviour
|
||||
}
|
||||
|
||||
// Cache parameters that don't change within the loop
|
||||
float sm = Mathf.Clamp(speedMultiplier, SpeedMultiplierMin, SpeedMultiplierMax);
|
||||
float sm = EffectiveSpeedMultiplier;
|
||||
float baseTravelTime = (60f / bpm) * 4f;
|
||||
float baseNoteTravelTime = baseTravelTime / Mathf.Max(0.0001f, sm);
|
||||
float noteSpeed = CalculateSpeed(baseNoteTravelTime);
|
||||
|
||||
Reference in New Issue
Block a user