HoldVisualMesh 以及快捷键更新

This commit is contained in:
SoulliesOfficial
2025-03-17 21:49:57 -04:00
parent 0e0e820e15
commit 0e22f6ac21
29 changed files with 2222 additions and 333 deletions

View File

@@ -36,7 +36,8 @@ namespace Ichni.RhythmGame
/// </summary>
public virtual void UpdateNoteInMovableTrack()
{
trackPositioner.SetPercent((track.trackTimeSubmodule as TrackTimeSubmoduleMovable).GetTrackPercent(exactJudgeTime));
TrackTimeSubmoduleMovable trackTimeSubmoduleMovable = track.trackTimeSubmodule as TrackTimeSubmoduleMovable;
trackPositioner.SetPercent(trackTimeSubmoduleMovable.GetTrackPercent(exactJudgeTime));
}
/// <summary>

View File

@@ -42,7 +42,7 @@ namespace Ichni.RhythmGame
this.trackDisplay.spline = path;
this.trackDisplay.size = 0.1f;
this.trackDisplay.gameObject.SetActive(isShowingDisplay);
this.SetDisplay(isShowingDisplay);
}
}
@@ -77,6 +77,13 @@ namespace Ichni.RhythmGame
{
path.SetPoint(point.index, point.node, SplineComputer.Space.Local);
}
public void SetDisplay(bool isShowing)
{
this.isShowingDisplay = isShowing;
trackDisplay.gameObject.SetActive(isShowing);
}
}
public partial class TrackPathSubmodule
@@ -103,7 +110,7 @@ namespace Ichni.RhythmGame
});
var showDisplayToggle = inspector.GenerateToggle(this, container, "Show Display", nameof(isShowingDisplay));
showDisplayToggle.AddListenerFunction(_ => trackDisplay.gameObject.SetActive(isShowingDisplay));
showDisplayToggle.AddListenerFunction(_ => SetDisplay(isShowingDisplay));
}
}

View File

@@ -58,8 +58,7 @@ namespace Ichni.RhythmGame
public float GetTrackPercent(float songTimeInTime)
{
float per = AnimationCurveEvaluator.Evaluate(animationCurveType,
(songTimeInTime - trackStartTime) / trackTotalTime);
float per = AnimationCurveEvaluator.Evaluate(animationCurveType, (songTimeInTime - trackStartTime) / trackTotalTime);
return Mathf.Clamp01(per);
}

View File

@@ -149,7 +149,7 @@ namespace Ichni.RhythmGame
/// 批量开启或关闭所有PathNode的Sphere显示
/// </summary>
/// <param name="isShowing"></param>
private void SetAllPathNodeSphere(bool isShowing)
public void SetAllPathNodeSphere(bool isShowing)
{
trackPathSubmodule.pathNodeList.ForEach(pn => pn.SetPathNodeSphere(isShowing));
}