优化,改bug

Signed-off-by: TRADER_FOER <lhf190@outlook.com>
This commit is contained in:
2026-07-09 23:25:02 +08:00
parent 879f1e49b8
commit fdc20cd66f
54 changed files with 288754 additions and 4266 deletions

View File

@@ -96,7 +96,7 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
public override void FirstSetUpObject(bool isFirstGenerated)
{
if (trailParticleSystem == null)
trailParticleSystem = GetComponent<ParticleSystem>();
trailParticleSystem = GetComponentInChildren<ParticleSystem>();
particleRenderer = trailParticleSystem != null
? trailParticleSystem.GetComponent<ParticleSystemRenderer>()
@@ -135,8 +135,14 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
/// </summary>
public void ApplyParticleSettings()
{
if (trailParticleSystem == null)
trailParticleSystem = GetComponentInChildren<ParticleSystem>();
if (trailParticleSystem == null) return;
if (particleRenderer == null)
particleRenderer = trailParticleSystem.GetComponent<ParticleSystemRenderer>();
float safeLifetime = Mathf.Max(particleLifetime, MinLifetime);
int safeCount = Mathf.Max(particleCount, 0);