diff --git a/Assets/Scripts/DataCore/GameElements_BM/Track/ParticleTracker_BM.cs b/Assets/Scripts/DataCore/GameElements_BM/Track/ParticleTracker_BM.cs index df97d54e..5010c8b0 100644 --- a/Assets/Scripts/DataCore/GameElements_BM/Track/ParticleTracker_BM.cs +++ b/Assets/Scripts/DataCore/GameElements_BM/Track/ParticleTracker_BM.cs @@ -1,4 +1,5 @@ using System; +using Dreamteck.Splines; using UnityEngine; namespace Ichni.RhythmGame.Beatmap @@ -21,6 +22,7 @@ namespace Ichni.RhythmGame.Beatmap public string materialThemeBundleName = string.Empty; public string materialName = string.Empty; + public ParticleController.PathNodeSizeMode pathNodeSizeMode = ParticleController.PathNodeSizeMode.LegacyOffset; public ParticleTracker_BM() { @@ -32,7 +34,8 @@ namespace Ichni.RhythmGame.Beatmap bool is3D, float width, Vector3 extendDirection, float density, float lifeTime, bool isAutoOrient, Vector3 particleRotation, - string materialThemeBundleName, string materialName) : base(elementName, elementGuid, tags, attachedElement) + string materialThemeBundleName, string materialName, + ParticleController.PathNodeSizeMode pathNodeSizeMode = ParticleController.PathNodeSizeMode.LegacyOffset) : base(elementName, elementGuid, tags, attachedElement) { this.prewarm = prewarm; this.playTime = playTime; @@ -47,6 +50,7 @@ namespace Ichni.RhythmGame.Beatmap this.materialThemeBundleName = materialThemeBundleName; this.materialName = materialName; + this.pathNodeSizeMode = pathNodeSizeMode; } public override void ExecuteBM() @@ -54,7 +58,8 @@ namespace Ichni.RhythmGame.Beatmap matchedElement = ParticleTracker.GenerateElement( elementName, elementGuid, tags, false, GetElement(attachedElementGuid) as Track, materialThemeBundleName, materialName, - prewarm, playTime, stopTime, is3D, width, extendDirection, density, lifeTime, isAutoOrient, particleRotation); + prewarm, playTime, stopTime, is3D, width, extendDirection, density, lifeTime, isAutoOrient, particleRotation, + pathNodeSizeMode); } } } diff --git a/Assets/Scripts/Game/GameElements/Track/Trackers/ParticleTracker.cs b/Assets/Scripts/Game/GameElements/Track/Trackers/ParticleTracker.cs index 371b1735..e1057f2e 100644 --- a/Assets/Scripts/Game/GameElements/Track/Trackers/ParticleTracker.cs +++ b/Assets/Scripts/Game/GameElements/Track/Trackers/ParticleTracker.cs @@ -26,6 +26,7 @@ namespace Ichni.RhythmGame public float lifeTime; public bool isAutoOrient; public Vector3 particleRotation; + public ParticleController.PathNodeSizeMode pathNodeSizeMode; #endregion #region [计算与状态缓存] Calculated & Cached States @@ -45,7 +46,8 @@ namespace Ichni.RhythmGame bool prewarm, float playTime, float stopTime, bool is3D, float width, Vector3 extendDirection, float density, float lifeTime, - bool isAutoOrient, Vector3 particleRotation) + bool isAutoOrient, Vector3 particleRotation, + ParticleController.PathNodeSizeMode pathNodeSizeMode = ParticleController.PathNodeSizeMode.LegacyOffset) { ParticleTracker particleTracker = Instantiate(GameManager.Instance.basePrefabs.particleTracker, track.transform) .GetComponent(); @@ -57,6 +59,7 @@ namespace Ichni.RhythmGame particleTracker.stopTime = stopTime; particleTracker.themeBundleName = themeBundleName; particleTracker.materialName = materialName; + particleTracker.pathNodeSizeMode = pathNodeSizeMode; (particleTracker as IHaveParticles).SetParticleMaterial(themeBundleName, materialName); particleTracker.SetParticleSettings(prewarm, is3D, width, extendDirection, density, lifeTime, isAutoOrient, particleRotation); return particleTracker; @@ -137,6 +140,7 @@ namespace Ichni.RhythmGame particleController.is3D = is3D; particleController.width = width; particleController.extendDirection = extendDirection; + particleController.pathNodeSizeMode = pathNodeSizeMode; particleController.Rebuild(); }