示例#1
0
        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;
                }
            }
        }
示例#2
0
        public void UpdateTrails()
        {
            for (int i = 0; i < _trails.Count; i++)
            {
                BaseTrail trail = _trails[i];

                trail.BaseUpdate();
                if (trail.Dead)
                {
                    _trails.RemoveAt(i);
                    i--;
                }
            }
        }
示例#3
0
 public void CreateCustomTrail(BaseTrail trail)
 {
     trail.BaseUpdate();
     _trails.Add(trail);
 }