fliXNA_xbox.FlxQuadTree.destroy C# (CSharp) Méthode

destroy() public méthode

public destroy ( ) : void
Résultat void
        public void destroy()
        {
            _headA.destroy();
            _headA = null;
            _tailA.destroy();
            _tailA = null;
            _headB.destroy();
            _headB = null;
            _tailB.destroy();
            _tailB = null;

            if(_northWestTree != null)
                _northWestTree.destroy();
            _northWestTree = null;
            if(_northEastTree != null)
                _northEastTree.destroy();
            _northEastTree = null;
            if(_southEastTree != null)
                _southEastTree.destroy();
            _southEastTree = null;
            if(_southWestTree != null)
                _southWestTree.destroy();
            _southWestTree = null;

            _object = null;
            _processingCallback = null;
            _notifyCallback = null;
        }

Usage Example

Exemple #1
0
        /// <summary>
        /// Returns true if the two FlxObjects overlap.  Optional Callback function of return type bool with two FlxObject parameters will be called if true.
        /// </summary>
        /// <param name="ObjectOrGroup1"></param>
        /// <param name="ObjectOrGroup2"></param>
        /// <param name="NotifyCallback"></param>
        /// <param name="ProcessCallback"></param>
        /// <returns></returns>
        static public Boolean overlap(FlxObject ObjectOrGroup1 = null, FlxObject ObjectOrGroup2 = null, Func <FlxObject, FlxObject, Boolean> NotifyCallback = null, Func <FlxObject, FlxObject, Boolean> ProcessCallback = null)
        {
            if (ObjectOrGroup1 == null)
            {
                ObjectOrGroup1 = FlxG.state;
            }
            if (ObjectOrGroup2 == ObjectOrGroup1)
            {
                ObjectOrGroup2 = null;
            }
            FlxQuadTree.divisions = FlxG.worldDivisions;
            FlxQuadTree quadTree = new FlxQuadTree(FlxG.worldBounds.x, FlxG.worldBounds.y, FlxG.worldBounds.width, FlxG.worldBounds.height);

            quadTree.load(ObjectOrGroup1, ObjectOrGroup2, NotifyCallback, ProcessCallback);
            Boolean result = quadTree.execute();

            quadTree.destroy();
            return(result);
        }
All Usage Examples Of fliXNA_xbox.FlxQuadTree::destroy