File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1002,6 +1002,16 @@ Phaser.Physics.Ninja.AABB.prototype = {
10021002
10031003 return Phaser . Physics . Ninja . AABB . COL_NONE ;
10041004
1005+ } ,
1006+
1007+ /**
1008+ * Destroys this AABB's reference to Body and System
1009+ *
1010+ * @method Phaser.Physics.Ninja.AABB#destroy
1011+ */
1012+ destroy : function ( ) {
1013+ this . body = null ;
1014+ this . system = null ;
10051015 }
10061016
10071017}
Original file line number Diff line number Diff line change @@ -417,8 +417,23 @@ Phaser.Physics.Ninja.Body.prototype = {
417417 */
418418 deltaY : function ( ) {
419419 return this . shape . pos . y - this . shape . oldpos . y ;
420- }
420+ } ,
421421
422+ /**
423+ * Destroys this body's reference to the sprite and system, and destroys its shape.
424+ *
425+ * @method Phaser.Physics.Ninja.Body#destroy
426+ */
427+ destroy : function ( ) {
428+ this . sprite = null ;
429+ this . system = null ;
430+ this . aabb = null ;
431+ this . tile = null ;
432+ this . circle = null ;
433+
434+ this . shape . destroy ( ) ;
435+ this . shape = null ;
436+ }
422437} ;
423438
424439/**
Original file line number Diff line number Diff line change @@ -2606,6 +2606,16 @@ Phaser.Physics.Ninja.Circle.prototype = {
26062606 }
26072607
26082608 return Phaser . Physics . Ninja . Circle . COL_NONE ;
2609+ } ,
2610+
2611+ /**
2612+ * Destroys this Circle's reference to Body and System
2613+ *
2614+ * @method Phaser.Physics.Ninja.Circle#destroy
2615+ */
2616+ destroy : function ( ) {
2617+ this . body = null ;
2618+ this . system = null ;
26092619 }
26102620
26112621}
You can’t perform that action at this time.
0 commit comments