Signed-off-by: TRAfoer <lhf190@outlook.com>
This commit is contained in:
2025-10-02 14:01:23 +08:00
parent b29654e423
commit 529ab31282
21 changed files with 1081861 additions and 21597 deletions

View File

@@ -5,6 +5,7 @@ using System.Linq;
using Dreamteck.Splines;
using Ichni.Editor;
using Ichni.RhythmGame.Beatmap;
using UniRx;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.InputSystem;
@@ -41,6 +42,13 @@ namespace Ichni.RhythmGame
hold.trackPositioner.updateMethod = SplineUser.UpdateMethod.LateUpdate;
hold.isOnTrack = true;
hold.UpdateNoteInTrack();
Observable.NextFrame().Subscribe(_ =>
{
hold.UpdateNoteInTrack();
track.Refresh();
track.trackPathSubmodule?.path.RebuildImmediate();
});
}
else
{
@@ -59,6 +67,7 @@ namespace Ichni.RhythmGame
}
return hold;
}
}

View File

@@ -67,7 +67,7 @@ namespace Ichni.RhythmGame
public override void Refresh()
{
base.Refresh();
if (noteVisual != null)
{
noteVisual.Refresh();
@@ -91,11 +91,13 @@ namespace Ichni.RhythmGame
if (isFirstJudged && songTime < exactJudgeTime)
{
isFirstJudged = false;
noteVisual.GetComponent<Collider>().enabled = !isFirstJudged;
}
else if (!isFirstJudged && songTime >= exactJudgeTime)
{
noteAudioSubmodule?.PlayNoteJudgeAudios(editor.currentJudgeType);
isFirstJudged = true;
noteVisual.GetComponent<Collider>().enabled = !isFirstJudged;
}
// 判定单元更新
@@ -140,7 +142,7 @@ namespace Ichni.RhythmGame
}
// 碰撞体状态
noteVisual.GetComponent<Collider>().enabled = !isFirstJudged;
}
}