Esempio 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);
            }
        }
Esempio 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();
        }
Esempio 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);
        }
Esempio n. 5
0
        public virtual void Destroy()
        {
            if (IsDestroyed)
            {
                return;
            }

            UnlinkD();

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

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