partial void RemoveProjSpecific() { Sprite?.Remove(); Sprite = null; DamagedSprite?.Remove(); DamagedSprite = null; _deformSprite?.Sprite?.Remove(); _deformSprite = null; DecorativeSprites.ForEach(s => s.Remove()); ConditionalSprites.Clear(); ConditionalSprites.ForEach(s => s.Remove()); ConditionalSprites.Clear(); LightSource?.Remove(); LightSource = null; OtherWearables?.ForEach(w => w.Sprite.Remove()); OtherWearables = null; HuskSprite?.Sprite.Remove(); HuskSprite = null; HerpesSprite?.Sprite.Remove(); HerpesSprite = null; }
private void Dispose(bool disposing) { if (!Disposed) { if (disposing) { Prefabs.Remove(this); #if CLIENT Sprite.Remove(); Sprite = null; DecorativeSprites.ForEach(sprite => sprite.Remove()); DecorativeSprites.Clear(); TargetProperties.Clear(); #endif } } Disposed = true; }