This commit is contained in:
SoulliesOfficial
2026-06-05 06:47:24 -04:00
parent 3995beeb29
commit 0fb72f5bba
94 changed files with 650754 additions and 4839 deletions

View File

@@ -1,10 +1,8 @@
using System.Collections;
using System.Collections.Generic;
using Ichni.RhythmGame;
using SLSUtilities.General;
using UnityEngine;
namespace Ichni.RhythmGame
namespace Ichni
{
/// <summary>
/// 编辑器 NoteManager集中管理场上所有 Note 的激活/隐藏与逐帧更新。
@@ -16,13 +14,12 @@ namespace Ichni.RhythmGame
/// - 时间区间内的 Note → 激活并更新
/// - 时间区间外的 Note → 隐藏
/// 保证无论时间如何跳转Note 的可见性和状态始终与 songTime 一致。
///
/// 此类为纯 C# 类,由 ElementUpdateScheduler 内部持有和驱动,
/// 不再继承 Singleton / MonoBehaviour。
/// </summary>
public class NoteManager : Singleton<NoteManager>
public class NoteManager
{
#region [] Singleton Alias
public new static NoteManager instance => Instance;
#endregion
#region [] Note Record
/// <summary>Note 条目:存储 Note 本身及其激活/消失的时间阈值</summary>
private struct NoteRecord
@@ -91,7 +88,7 @@ namespace Ichni.RhythmGame
#region [] Manager-Driven Tick
/// <summary>
/// 由 EditorManager.Update 统一调度
/// 由 ElementUpdateScheduler.Tick 在 Phase.Note 阶段调用
///
/// <para>
/// 编辑器时间可逆策略:每帧通过二分查找定位当前 songTime 覆盖的激活窗口,
@@ -124,9 +121,6 @@ namespace Ichni.RhythmGame
right = mid - 1;
}
}
// firstInWindow 此时指向最后一个 activationTime <= songTime 的 Note
// 从 0 向左扫描(也就是从头扫描到 firstInWindow都可能在窗口内
// 实际需要activationTime <= songTime && finishTime >= songTime
// 3. 遍历所有 Note判断是否在当前窗口内
for (int i = 0; i < count; i++)
@@ -156,4 +150,4 @@ namespace Ichni.RhythmGame
}
#endregion
}
}
}