コード例 #1
0
        private void DrawTextOverheads(UltimaBatcher2D batcher, int startX, int startY, float scale)
        {
            if (_firstNode != null)
            {
                var first = _firstNode;

                int mouseX = Mouse.Position.X;
                int mouseY = Mouse.Position.Y;

                while (first != null)
                {
                    float alpha = first.IsOverlap(first.Right);
                    first.Draw(batcher, startX, startY, scale);
                    first.SetAlpha(alpha);

                    if (first.Contains(mouseX, mouseY))
                    {
                    }

                    var temp = first.Right;
                    first.Right = null;
                    first       = temp;
                }

                _firstNode = null;
            }
        }
コード例 #2
0
ファイル: OverheadManager.cs プロジェクト: roxya/ClassicUO
        public void Clear()
        {
            if (_toRemoveDamages.Count > 0)
            {
                _toRemoveDamages.ForEach(s =>
                {
                    _damages.Remove(s);
                });
                _toRemoveDamages.Clear();
            }

            _subst.Clear();

            var last = _firstNode;

            while (last != null)
            {
                var temp = last.Right;

                last.Destroy();

                last.Left  = null;
                last.Right = null;

                last = temp;
            }

            _firstNode = null;

            _staticToUpdate.ForEach(s => s.Destroy());
            _staticToUpdate.Clear();
        }
コード例 #3
0
ファイル: OverheadManager.cs プロジェクト: roxya/ClassicUO
        public void AddOverhead(OverheadMessage overhead)
        {
            if ((overhead.Parent is Static || overhead.Parent is Multi) && !_staticToUpdate.Contains(overhead.Parent))
            {
                _staticToUpdate.Add(overhead.Parent);
            }

            if (_firstNode == null)
            {
                _firstNode = overhead;
            }
            else
            {
                var last = _firstNode;

                while (last.Right != null)
                {
                    last = last.Right;
                }

                last.Right     = overhead;
                overhead.Right = null;
            }
        }
コード例 #4
0
        public void Clear()
        {
            if (_toRemoveDamages.Count > 0)
            {
                foreach (Serial s in _toRemoveDamages)
                {
                    _damages.Remove(s);
                }

                _toRemoveDamages.Clear();
            }

            _subst.Clear();

            var last = _firstNode;

            while (last != null)
            {
                var temp = last.Right;

                last.Destroy();

                last.Left  = null;
                last.Right = null;

                last = temp;
            }

            _firstNode = null;

            foreach (GameObject s in _staticToUpdate)
            {
                s.Destroy();
            }
            _staticToUpdate.Clear();
        }