public void UpdateHits(byte perc) { if (perc != HitsPercentage || (HitsTexture == null || HitsTexture.IsDestroyed)) { HitsPercentage = perc; ushort color = 0x0044; if (perc < 30) { color = 0x0021; } else if (perc < 50) { color = 0x0030; } else if (perc < 80) { color = 0x0058; } HitsTexture?.Destroy(); HitsTexture = RenderedText.Create($"[{perc}%]", color, 3, false); } }
public override void Dispose() { base.Dispose(); _labelName.Destroy(); _labelPing.Destroy(); _labelPacketLoss.Destroy(); }
public override void Dispose() { _gameText?.Destroy(); _gameTextNormal?.Destroy(); _gameTextOver?.Destroy(); _gameText = null; _gameTextNormal = null; _gameTextOver = null; base.Dispose(); }
public virtual void Destroy() { if (IsDestroyed) return; UnlinkD(); RealScreenPosition = Point.Zero; IsDestroyed = true; RenderedText?.Destroy(); RenderedText = null; Owner = null; _queue.ReturnOne(this); }
public virtual void Destroy() { if (IsDestroyed) { return; } UnlinkD(); IsDestroyed = true; RenderedText?.Destroy(); RenderedText = null; Owner = null; _queue.ReturnOne(this); }
public override void Dispose() { base.Dispose(); _gameText?.Destroy(); }
public override void Dispose() { _gText?.Destroy(); base.Dispose(); }
public override void Dispose() { _renderedText?.Destroy(); base.Dispose(); }