This commit is contained in:
SoulliesOfficial
2025-07-21 05:42:20 -04:00
parent e483cfe502
commit bae0bfbc20
533 changed files with 172709 additions and 125965 deletions

View File

@@ -13,16 +13,16 @@ namespace Ichni.RhythmGame
public float bpm; //每分钟节拍数
public float delay; //设定音乐和谱面延迟Delay秒后开始在延迟中SongPosition为负数。
//public float songTime;
//public float songBeat => songTime / 60 * bpm;
public float songLength;
public float offset = 0f;
public BaseElement_BM matchedBM { get; set; }
public SongInformation(string songName, float bpm, float delay)
public SongInformation(string songName, float bpm, float delay, float offset)
{
this.songName = songName;
this.bpm = bpm;
this.delay = delay;
this.offset = offset;
GameManager.instance.audioManager.songPlayer.songTimeSegment = -delay; // 初始化时,歌曲时间为负
GameManager.instance.audioManager.isDelaying = delay > 0;
@@ -30,12 +30,7 @@ namespace Ichni.RhythmGame
public void SaveBM()
{
matchedBM = new SongInformation_BM(songName, bpm, delay);
}
public void SetUpInspector()
{
matchedBM = new SongInformation_BM(songName, bpm, delay, offset);
}
}
@@ -46,22 +41,24 @@ namespace Ichni.RhythmGame
public string songName;
public float bpm;
public float delay;
public float offset = 0f;
public SongInformation_BM()
{
}
public SongInformation_BM(string songName, float bpm, float delay)
public SongInformation_BM(string songName, float bpm, float delay, float offset)
{
this.songName = songName;
this.bpm = bpm;
this.delay = delay;
this.offset = offset;
}
public override void ExecuteBM()
{
GameManager.instance.songInformation = new SongInformation(songName, bpm, delay);
GameManager.instance.songInformation = new SongInformation(songName, bpm, delay, offset);
}
}
}