fliXNA_xbox.FlxQuadTree.addToList C# (CSharp) Method

addToList() protected method

protected addToList ( ) : void
return void
        protected void addToList()
        {
            FlxList ot;
            if(_list == A_LIST)
            {
                if(_tailA.Object != null)
                {
                    ot = _tailA;
                    _tailA = new FlxList();
                    ot.next = _tailA;
                }
                _tailA.Object = _object;
            }
            else
            {
                if(_tailB.Object != null)
                {
                    ot = _tailB;
                    _tailB = new FlxList();
                    ot.next = _tailB;
                }
                _tailB.Object = _object;
            }
            if(!_canSubdivide)
                return;
            if(_northWestTree != null)
                _northWestTree.addToList();
            if(_northEastTree != null)
                _northEastTree.addToList();
            if(_southEastTree != null)
                _southEastTree.addToList();
            if(_southWestTree != null)
                _southWestTree.addToList();
        }

Usage Example

Beispiel #1
0
        protected void addToList()
        {
            FlxList ot;

            if (_list == A_LIST)
            {
                if (_tailA.Object != null)
                {
                    ot      = _tailA;
                    _tailA  = new FlxList();
                    ot.next = _tailA;
                }
                _tailA.Object = _object;
            }
            else
            {
                if (_tailB.Object != null)
                {
                    ot      = _tailB;
                    _tailB  = new FlxList();
                    ot.next = _tailB;
                }
                _tailB.Object = _object;
            }
            if (!_canSubdivide)
            {
                return;
            }
            if (_northWestTree != null)
            {
                _northWestTree.addToList();
            }
            if (_northEastTree != null)
            {
                _northEastTree.addToList();
            }
            if (_southEastTree != null)
            {
                _southEastTree.addToList();
            }
            if (_southWestTree != null)
            {
                _southWestTree.addToList();
            }
        }