HoldVisualMesh 以及快捷键更新
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user