54 lines
1.9 KiB
C#
54 lines
1.9 KiB
C#
using System;
|
||
using UnityEngine;
|
||
|
||
[Serializable]
|
||
public class NoteData
|
||
{
|
||
public int trackIndex; // 轨道索引
|
||
public float time; // 音符出现时间(秒)
|
||
public string color; // 音符颜色(如 "red", "blue")
|
||
public string type; // 音符类型("tap" = 单击,"hold" = 长按)
|
||
public float length; // 音符长度(仅用于长按音符,单位:秒)
|
||
|
||
// New fields for judgement recording
|
||
// judgeOffsetMs: signed offset in milliseconds recorded at judgement time
|
||
// positive = early (玩家按在目标时间之前), negative = late (玩家按在目标时间之后)
|
||
// For tap notes this stores the single judgement offset. For hold notes, start judgement stored in judgeOffsetMs,
|
||
// and end judgement stored in judgeOffsetMsEnd. Misses do not write offsets (left as NaN).
|
||
public float judgeOffsetMs = float.NaN;
|
||
public float judgeOffsetMsEnd = float.NaN;
|
||
|
||
// Optionally record result strings for debugging/analysis
|
||
public string judgeResult = null;
|
||
public string judgeResultEnd = null;
|
||
}
|
||
|
||
[Serializable]
|
||
public class TrackData
|
||
{
|
||
public string color; // 轨道颜色
|
||
}
|
||
|
||
[Serializable]
|
||
public class Beatmap
|
||
{
|
||
public string title; // 歌曲名
|
||
public string composer; // 作曲家
|
||
public string illustrator; // 画师
|
||
public string charter; // 谱师
|
||
public string beatmapId; // 谱面自定编号
|
||
public float duration; // 歌曲时长(秒)
|
||
public float bpm; // BPM
|
||
public int difficulty; // 难度(数字)
|
||
public string difficultyName;// 难度代号(如 "Easy", "Hard", "Expert")
|
||
public string createdDate; // 谱面创建日期(字符串格式:yyyy-MM-dd)
|
||
public string musicFile; // 音乐文件路径
|
||
public string backgroundFile;// 曲绘文件路径
|
||
|
||
public TrackData[] tracks; // 轨道信息(每个轨道的颜色)
|
||
public NoteData[] notes; // 音符列表
|
||
|
||
public bool is_official = true;
|
||
}
|
||
|