新谱
This commit is contained in:
@@ -48,6 +48,11 @@ namespace Ichni.RhythmGame
|
||||
}
|
||||
}
|
||||
|
||||
private void LateUpdate()
|
||||
{
|
||||
if(trackPathSubmodule != null) trackPathSubmodule.refreshedThisFrame = false;
|
||||
}
|
||||
|
||||
public override void AfterInitialize()
|
||||
{
|
||||
base.AfterInitialize();
|
||||
@@ -56,6 +61,18 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
trackPathSubmodule.ClosePath();
|
||||
}
|
||||
|
||||
if(trackRendererSubmodule != null)
|
||||
{
|
||||
//var path = trackPathSubmodule!.path;
|
||||
|
||||
trackRendererSubmodule.meshGenerator.autoUpdate = false;
|
||||
/*path.ResampleTransform();
|
||||
path.Subscribe(trackRendererSubmodule.meshGenerator);
|
||||
path.EditorUpdateConnectedNodes();
|
||||
path.RebuildImmediate(true, true);*/
|
||||
//path.EditorAwake();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@ namespace Ichni.RhythmGame
|
||||
public Track.TrackSamplingType trackSamplingType;
|
||||
public bool isClosed;
|
||||
|
||||
public bool refreshedThisFrame = false;
|
||||
|
||||
public bool isShowingDisplay;
|
||||
|
||||
public TrackPathSubmodule(Track track, Track.TrackSpaceType trackSpaceType,
|
||||
@@ -79,16 +81,17 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void Refresh()
|
||||
{
|
||||
if(refreshedThisFrame) return;
|
||||
refreshedThisFrame = true;
|
||||
|
||||
SetTrackSpaceType((int)trackSpaceType);
|
||||
SetUpSplineComputer(trackSpaceType, trackSamplingType);
|
||||
|
||||
|
||||
foreach (var pathNode in pathNodeList)
|
||||
{
|
||||
SetPathNode(pathNode);
|
||||
}
|
||||
ClosePath();
|
||||
path.Rebuild(true);
|
||||
path.RebuildImmediate(true, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Dreamteck.Splines;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using UniRx;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
Reference in New Issue
Block a user