new file: .DS_Store

new file:   Audio/track.mp3
	new file:   Audio/track.mp3.import
	modified:   Charts/track.json
	modified:   Scenes/Game/level.tscn
	new file:   Scripts/.DS_Store
	modified:   Scripts/Core/GameManager.cs
	modified:   Scripts/Core/MusicClock.cs
	modified:   Scripts/Core/TrackGenerator.cs
	modified:   Scripts/Data/ChartEvent.cs
	modified:   Scripts/Data/TrackData.cs
	modified:   Scripts/GameObjects/NoteObject.cs
This commit is contained in:
CrbnsCat10n
2026-04-12 17:24:27 +08:00
parent 0e6bf1dcad
commit 778d68fd00
14 changed files with 154 additions and 38 deletions

View File

@@ -6,6 +6,7 @@ namespace Onrinto.Chart;
public class TrackData
{
public string MusicPath { get; set; }
public int BPM { get; set; }
public double Offset { get; set; }
public double TicksPerBeat { get; set; }
@@ -107,6 +108,10 @@ public class TrackData
if(point.IsLinear && idx < speedPoints.Count - 1)
{
double nextTime = TickToSeconds(speedPoints[idx + 1].Tick);
if (nextTime <= pointTime)
{
return cachedZ + (float)deltaTime * point.Speed;
}
float t = (float)((time - pointTime) / (nextTime - pointTime));
float currentSpeed = Mathf.Lerp(point.Speed, speedPoints[idx + 1].Speed, t);
return cachedZ + (float)deltaTime * (point.Speed + currentSpeed) * 0.5f;