68 lines
1.3 KiB
C#
68 lines
1.3 KiB
C#
|
|
using System;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
[Serializable]
|
||
|
|
public class NoteData
|
||
|
|
{
|
||
|
|
public float time;
|
||
|
|
public int position; // column 0-3
|
||
|
|
public int lineLayer; // row 0-2
|
||
|
|
public int colorType; // 0=red, 1=blue
|
||
|
|
public int cutDirection; // 0-8 (see Beat Saber spec)
|
||
|
|
}
|
||
|
|
|
||
|
|
[Serializable]
|
||
|
|
public class MapData
|
||
|
|
{
|
||
|
|
public List<NoteData> target;
|
||
|
|
}
|
||
|
|
|
||
|
|
[Serializable]
|
||
|
|
public class SongsList
|
||
|
|
{
|
||
|
|
public string version;
|
||
|
|
public List<SongInfo> songs;
|
||
|
|
}
|
||
|
|
|
||
|
|
[Serializable]
|
||
|
|
public class SongInfo
|
||
|
|
{
|
||
|
|
public string id;
|
||
|
|
public string title;
|
||
|
|
public string artist;
|
||
|
|
public float bpm;
|
||
|
|
public int duration;
|
||
|
|
public string audioFile;
|
||
|
|
public long audioSize;
|
||
|
|
public string coverImage;
|
||
|
|
public DifficultyMap difficulties;
|
||
|
|
public string addedAt;
|
||
|
|
}
|
||
|
|
|
||
|
|
[Serializable]
|
||
|
|
public class DifficultyMap
|
||
|
|
{
|
||
|
|
public DifficultyInfo normal;
|
||
|
|
public DifficultyInfo hard;
|
||
|
|
public DifficultyInfo expert;
|
||
|
|
public DifficultyInfo expertplus;
|
||
|
|
|
||
|
|
public DifficultyInfo Get(string key) => key switch
|
||
|
|
{
|
||
|
|
"normal" => normal,
|
||
|
|
"hard" => hard,
|
||
|
|
"expert" => expert,
|
||
|
|
"expertplus" => expertplus,
|
||
|
|
_ => null
|
||
|
|
};
|
||
|
|
}
|
||
|
|
|
||
|
|
[Serializable]
|
||
|
|
public class DifficultyInfo
|
||
|
|
{
|
||
|
|
public string mapFile;
|
||
|
|
public long mapSize;
|
||
|
|
public int noteCount;
|
||
|
|
}
|