This commit is contained in:
SoulliesOfficial
2026-06-05 04:45:57 -04:00
parent 3a63641a2c
commit 7c60c40d6b
377 changed files with 10970 additions and 843 deletions

View File

@@ -44,6 +44,8 @@ namespace Ichni
public List<IHaveTransformSubmodule> activeTransformSubmodules = new List<IHaveTransformSubmodule>();
public List<IHaveColorSubmodule> activeColorSubmodules = new List<IHaveColorSubmodule>();
public List<IHaveDirtyMarkSubmodule> activeDirtyMarkSubmodules = new List<IHaveDirtyMarkSubmodule>();
public ElementUpdateScheduler updateScheduler;
[Title("UI")]
public Canvas judgeHintCanvas;
@@ -64,6 +66,8 @@ namespace Ichni
CoreServices.TimeProvider = this;
timeDurations = new List<TimeDurationSubmodule>();
playingRecorder = new PlayingRecorder();
updateScheduler = new ElementUpdateScheduler();
CoreServices.UpdateScheduler = updateScheduler;
}
private void Start()
@@ -74,43 +78,12 @@ namespace Ichni
private void Update()
{
if (!songPlayer.isUpdating) return;
foreach (var timeDuration in timeDurations)
{
timeDuration?.DetectAndSwitchActiveState(SongTime);
}
animationManager.ManualUpdate(SongTime);
trackManager.ManualUpdate(SongTime);
noteManager.ManualUpdate(SongTime);
updateScheduler.TickEarly(SongTime);
}
private void LateUpdate()
{
if (songPlayer.isUpdating)
{
trackManager.ManualLateUpdate(SongTime);
noteManager.ManualLateUpdate(SongTime);
for (int i = 0; i < activeColorSubmodules.Count; i++)
{
activeColorSubmodules[i].UpdateColor(true);
}
for (int i = 0; i < activeTransformSubmodules.Count; i++)
{
activeTransformSubmodules[i].UpdateTransform(true);
}
}
if (songPlayer.isStarting || songPlayer.isPlaying)
{
for (int i = 0; i < activeDirtyMarkSubmodules.Count; i++)
{
activeDirtyMarkSubmodules[i]?.dirtyMarkSubmodule?.ExecuteDeferredRefresh();
}
}
updateScheduler.TickLate();
}
}