修复了一些bug(包含窗口预制体中的错误与{}列表解析存在死循环的错误)

This commit is contained in:
2025-10-04 23:09:46 +08:00
parent 1ecb1b0ba4
commit 84e31fe63a
16 changed files with 2590 additions and 832 deletions

View File

@@ -78,9 +78,11 @@ namespace Demo.Editor
[Content, SerializeField] private List<BPMLine> BPMLineEntries = new();
[Content] public int BPMFraction = 4;
[Content] public float BPMOffset = 0;
[Content] public float SongOffset = 0;
[Content] public float BPM = 60;
private float onebarDeltaTime;
private void InjectSetSongCurrentTime(float time)
{
// 秒,可见长度,以下相同,注意并非百分比
@@ -170,8 +172,9 @@ namespace Demo.Editor
// BPM
BPM = (float)MainGameController.MainConfig.FindItem(nameof(BPM), BPM);
onebarDeltaTime = 60.0f / (BPM * BPMFraction);
BPMFraction = (int)MainGameController.MainConfig.FindItem(nameof(BPMFraction), BPMFraction);
BPMOffset = (float)MainGameController.MainConfig.FindItem(nameof(BPMOffset), BPMOffset);
SongOffset = (float)MainGameController.MainConfig.FindItem(nameof(SongOffset), SongOffset);
// 绘制时频
var texturePath = (string)MainGameController.MainConfig.FindItem(nameof(SpectrumRenderTexture), null);
@@ -492,7 +495,6 @@ namespace Demo.Editor
var time = MainGameController.CurrentTime;
float onebarDeltaTime = 60.0f / (BPM * BPMFraction);
int BPMLineEntriesIndex = 0;
float farAplha = (1 - SpectrumSeeline.currentPercent) * 0.5f + 0.5f;
float foucs = Mathf.CeilToInt((time + leftClipFrom ) / onebarDeltaTime) * onebarDeltaTime;