void UpdatePositions() { LinkedListNode <SpurtPosition> position = positions.First; while (position != null) { if (position.Value != null) { if (position.Value.IsDead) { if (!position.Value.IsPainted && !IsRemoteControlled) { paintBrush.Paint(position.Value.Position, position.Value.Color, (int)(position.Value.Radius * 4 * PaintBrush.SCALE_FACTOR)); if (position.Previous != null && position.Previous.Value != null && position.Previous.Value.IsDead) { PaintToPosition(position.Value, position.Previous.Value); } if (position.Next != null && position.Next.Value != null && position.Next.Value.IsDead) { PaintToPosition(position.Value, position.Next.Value); } position.Value.IsPainted = true; } } else { position.Value.Step(); position.Value.Radius += radiusGrowthSpeed * Time.deltaTime; } } position = position.Next; } }