skybox subsetter
This commit is contained in:
@@ -13,6 +13,7 @@ namespace Ichni.RhythmGame
|
||||
public float bpm; //每分钟节拍数
|
||||
public float delay; //设定音乐和谱面延迟Delay秒后开始,在延迟中,SongPosition为负数。
|
||||
|
||||
public float songLength;
|
||||
public float songTime;
|
||||
public float songBeat => songTime / 60 * bpm;
|
||||
|
||||
@@ -25,7 +26,18 @@ namespace Ichni.RhythmGame
|
||||
this.delay = delay;
|
||||
songLocation = EditorManager.instance.projectInformation.projectPath + "/" + songName;
|
||||
Debug.Log("Loading song from " + songLocation + " " + ES3.FileExists(songLocation));
|
||||
song = ES3.LoadAudio(songLocation, AudioType.WAV);
|
||||
|
||||
string extension = System.IO.Path.GetExtension(songLocation).ToLower();
|
||||
|
||||
song = extension switch
|
||||
{
|
||||
".mp3" => ES3.LoadAudio(songLocation, AudioType.MPEG),
|
||||
".ogg" => ES3.LoadAudio(songLocation, AudioType.OGGVORBIS),
|
||||
".wav" => ES3.LoadAudio(songLocation, AudioType.WAV),
|
||||
_ => throw new System.Exception("Unsupported audio format: " + extension)
|
||||
};
|
||||
|
||||
songLength = song.length;
|
||||
}
|
||||
|
||||
public void SaveBM()
|
||||
|
||||
Reference in New Issue
Block a user