public void TryEndTrail(Projectile projectile, float dissolveSpeed) { for (int i = 0; i < _trails.Count; i++) { BaseTrail trail = _trails[i]; if (trail.MyProjectile.whoAmI == projectile.whoAmI && trail is Trail t) { t.DissolveSpeed = dissolveSpeed; t.StartDissolve(); return; } } }
public void UpdateTrails() { for (int i = 0; i < _trails.Count; i++) { BaseTrail trail = _trails[i]; trail.BaseUpdate(); if (trail.Dead) { _trails.RemoveAt(i); i--; } } }
public void CreateCustomTrail(BaseTrail trail) { trail.BaseUpdate(); _trails.Add(trail); }