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; }
public void Remove() { if (sprite != null) { sprite.Remove(); sprite = null; } if (damagedSprite != null) { damagedSprite.Remove(); damagedSprite = null; } if (body != null) { body.Remove(); body = null; } #if CLIENT if (LightSource != null) { LightSource.Remove(); } #endif }
partial void RemoveProjSpecific() { Sprite?.Remove(); Sprite = null; DamagedSprite?.Remove(); DamagedSprite = null; DeformSprite?.Sprite?.Remove(); DeformSprite = null; LightSource?.Remove(); LightSource = null; }
private IEnumerable <object> DimLight(LightSource light) { float currBrightness = 1.0f; while (light.Color.A > 0.0f && flashDuration > 0.0f) { light.Color = new Color(light.Color.R, light.Color.G, light.Color.B, (byte)(currBrightness * 255)); currBrightness -= 1.0f / flashDuration * CoroutineManager.DeltaTime; yield return(CoroutineStatus.Running); } light.Remove(); yield return(CoroutineStatus.Success); }
partial void RemoveProjSpecific() { Sprite?.Remove(); Sprite = null; DamagedSprite?.Remove(); DamagedSprite = null; DeformSprite?.Sprite?.Remove(); DeformSprite = null; LightSource?.Remove(); LightSource = null; OtherWearables?.ForEach(w => w.Sprite.Remove()); OtherWearables = null; }
public void Remove() { lightSource.Remove(); if (basicSoundIndex > 0) { Sounds.SoundManager.Stop(basicSoundIndex); basicSoundIndex = -1; } if (largeSoundIndex > 0) { Sounds.SoundManager.Stop(largeSoundIndex); largeSoundIndex = -1; } hull.RemoveFire(this); }
private IEnumerable<object> DimLight(LightSource light) { float currBrightness = 1.0f; float startRange = light.Range; while (light.Color.A > 0.0f && flashDuration > 0.0f) { light.Color = new Color(light.Color.R, light.Color.G, light.Color.B, currBrightness); currBrightness -= (1.0f / flashDuration) * CoroutineManager.DeltaTime; yield return CoroutineStatus.Running; } light.Remove(); yield return CoroutineStatus.Success; }
private IEnumerable <object> DimLight(LightSource light) { float currBrightness = 1.0f; float startRange = light.Range; while (light.Color.A > 0.0f) { light.Color = new Color(light.Color.R, light.Color.G, light.Color.B, currBrightness); light.Range = startRange * currBrightness; currBrightness -= CoroutineManager.DeltaTime * 20.0f; yield return(CoroutineStatus.Running); } light.Remove(); yield return(CoroutineStatus.Success); }
protected override void RemoveComponentSpecific() { base.RemoveComponentSpecific(); light.Remove(); }