gameplay所有基本功能都装了,加入了全局警告。加入飘字等各种东西。
This commit is contained in:
@@ -289,7 +289,7 @@ public class HoldNote : BaseNote
|
||||
private float cachedTravelTime = 1.0f; // Cached travel time for distance optimization
|
||||
|
||||
public void Setup(int id, int trackIndex, float speed, float time, float delay,
|
||||
bool isEnd, float scheduledEnd, string color, KeyCode key, string type, NoteJudgeConfig judgeConfig, NoteData noteData)
|
||||
bool isEnd, float scheduledEnd, string color, KeyCode key, string type, float travelTimeSeconds, NoteJudgeConfig judgeConfig, NoteData noteData)
|
||||
{
|
||||
this.id = id;
|
||||
// Ensure singletons are up to date if they were re-initialized (e.g. on scene reload)
|
||||
@@ -350,15 +350,7 @@ public class HoldNote : BaseNote
|
||||
|
||||
controller?.SetSpeed(speed);
|
||||
|
||||
// IMPORTANT: configure timing using the same timebase as hitTime.
|
||||
// NoteSpawner/Setup passes 'time' as the base realtime hit point already (startTime + note.time + globalHitDelay).
|
||||
// We need travelTime so the segment starts moving at (hitTime - travelTime) rather than (Time.time + delay).
|
||||
float travelTime = 0f;
|
||||
if (speed > 0.0001f)
|
||||
{
|
||||
// NoteSpawner.CalculateSpeed uses: speed = 10.75f / travelTime, so travelTime = 10.75f / speed
|
||||
travelTime = 10.75f / speed;
|
||||
}
|
||||
float travelTime = Mathf.Max(0f, travelTimeSeconds);
|
||||
this.cachedTravelTime = travelTime;
|
||||
|
||||
if (controller != null)
|
||||
@@ -1088,7 +1080,7 @@ public class HoldNote : BaseNote
|
||||
|
||||
int pmDelta = ComputePmDeltaFromJudge(result, ally);
|
||||
float efficiency = (ally != null && !ally.IsDead) ? ally.scoreEfficiency : 0f;
|
||||
ScoreManager.Instance?.AddPmScoreForTrack(TrackIndex, pmDelta, efficiency);
|
||||
ScoreManager.Instance?.AddPmScoreForTrack(TrackIndex, pmDelta, efficiency, false);
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user