Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
 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();
        }
Exemplo n.º 4
0
        public virtual void Destroy()
        {
            if (IsDestroyed)
                return;

            UnlinkD();

            RealScreenPosition = Point.Zero;
            IsDestroyed = true;
            RenderedText?.Destroy();
            RenderedText = null;
            Owner = null;

            _queue.ReturnOne(this);
        }
Exemplo n.º 5
0
        public virtual void Destroy()
        {
            if (IsDestroyed)
            {
                return;
            }

            UnlinkD();

            IsDestroyed = true;
            RenderedText?.Destroy();
            RenderedText = null;
            Owner        = null;

            _queue.ReturnOne(this);
        }
Exemplo n.º 6
0
 public override void Dispose()
 {
     base.Dispose();
     _gameText?.Destroy();
 }
Exemplo n.º 7
0
 public override void Dispose()
 {
     _gText?.Destroy();
     base.Dispose();
 }
Exemplo n.º 8
0
 public override void Dispose()
 {
     _renderedText?.Destroy();
     base.Dispose();
 }