修DTM Trail
This commit is contained in:
@@ -35,11 +35,9 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
|
||||
bool isStatic, FlexibleFloat visibleTimeLength, FlexibleBool enableTimes, FlexibleFloat headRotateSpeed, float enableProcessTime,
|
||||
float headSize)
|
||||
{
|
||||
visibleTimeLength ??= new FlexibleFloat(new List<AnimatedFloat>() { new AnimatedFloat(0, 1, 1, 1, AnimationCurveType.Linear) });
|
||||
|
||||
DTMTrail dtmTrail = EnvironmentObject.GenerateElement(elementName, id, tags,
|
||||
isFirstGenerated, themeBundleName, objectName, parentElement, isStatic).GetComponent<DTMTrail>();
|
||||
dtmTrail.trailRenderer = dtmTrail.trailBody.GetComponent<TrailRenderer>();
|
||||
|
||||
dtmTrail.isHeadEnabled = false;
|
||||
dtmTrail.visibleTimeLength = visibleTimeLength;
|
||||
dtmTrail.enableTimes = enableTimes;
|
||||
@@ -47,9 +45,6 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
|
||||
dtmTrail.enableProcessTime = enableProcessTime;
|
||||
dtmTrail.headSize = headSize;
|
||||
|
||||
dtmTrail.SetUpTweeners();
|
||||
|
||||
dtmTrail.renderers.ForEach(rend => rend.InitializeShader());
|
||||
return dtmTrail;
|
||||
}
|
||||
|
||||
@@ -70,10 +65,15 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
|
||||
enableTimes.Add(new AnimatedBool(1f, true));
|
||||
}
|
||||
|
||||
SetUpTweeners();
|
||||
trailRenderer = trailBody.GetComponent<TrailRenderer>();
|
||||
var rotationBySpeedModule = headCircleParticle.rotationBySpeed;
|
||||
rotationBySpeedModule.z = 0;
|
||||
headPoint.transform.localScale = Vector3.zero;
|
||||
headCircle.transform.localScale = Vector3.zero;
|
||||
|
||||
renderers.ForEach(rend => rend.InitializeShader());
|
||||
Refresh();
|
||||
}
|
||||
|
||||
public override void Refresh()
|
||||
@@ -119,6 +119,7 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
|
||||
visibleTimeLength.UpdateFlexibleFloat(songTime);
|
||||
if (visibleTimeLength.animations.Count > 0)
|
||||
{
|
||||
Debug.Log(trailRenderer == null);
|
||||
trailRenderer.time = visibleTimeLength.value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user