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

@@ -45,16 +45,44 @@ namespace Ichni.RhythmGame
public override void AfterInitialize()
{
base.AfterInitialize();
// 注册 Phase 7Effect确保在 Track/TrackFollowerPhase 4/5和 NotePhase 6
// 全部更新完毕后再计算旋转覆盖,避免因位置尚未就绪导致的旋转抖动
CoreServices.UpdateScheduler.Register(UpdatePhase.Effect, this);
}
public override void OnDelete()
{
base.OnDelete();
CoreServices.UpdateScheduler.Unregister(UpdatePhase.Effect, this);
}
public override void ManualUpdate(float songTime, bool forceUpdate = false)
{
base.ManualUpdate(songTime, forceUpdate);
// 动画结束时同步注销 Phase 7
if (timeDurationSubmodule.CheckAfterEndTime(songTime))
{
CoreServices.UpdateScheduler.Unregister(UpdatePhase.Effect, this);
}
}
#endregion
#region [] Core Animation Logic
void LateUpdate()
public override void ScheduledUpdate(UpdatePhase phase, float songTime)
{
if (enabling.value)
switch (phase)
{
(animatedObject as IHaveTransformSubmodule)?.UpdateLookAt(this);
case UpdatePhase.Animation:
base.ScheduledUpdate(phase, songTime);
break;
case UpdatePhase.Effect:
// 在所有 Track/TrackFollower/Note 位置更新完毕后覆盖旋转
if (enabling.value)
{
(animatedObject as IHaveTransformSubmodule)?.UpdateLookAt(this);
}
break;
}
}