Exemplo n.º 1
0
        public virtual void DrawNode(SpriteBatch batch)
        {
            if (_isClose)
            {
                return;
            }
            if (!this._visible)
            {
                return;
            }
            for (int i = this._childCount - 1; i >= 0; i--)
            {
                if (childs[i] != null && childs[i].GetZOrder() < 0)
                {
                    childs[i].DrawNode(batch);
                }
            }
            this.Draw(batch);
            int zOrder = 0;

            for (int i = this._childCount - 1; i >= 0; i--)
            {
                LNNode o = this.childs[i];
                if (o != null)
                {
                    if (o.GetZOrder() >= 0)
                    {
                        if (zOrder == 0)
                        {
                            zOrder = o.GetZOrder();
                        }
                        else
                        {
                            zOrder = o.GetZOrder();
                        }

                        o.DrawNode(batch);
                    }
                }
            }
        }