mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 05:58:30 +00:00
Calling P2.Body.destroy or ArcadePhysics.Body.destroy wouldn't null the parent sprite body, causing it to error in the next update (thanks @jonathanhooker #1077)
This commit is contained in:
parent
ec687868de
commit
0f207c47a7
3 changed files with 3 additions and 1 deletions
|
@ -125,6 +125,7 @@ Version 2.1.0 - "Cairhien" - -in development-
|
|||
* Debug.cameraInfo no longer crashes if the camera bounds are nulled (thanks @wayfu #1143)
|
||||
* Camera.setBoundsToWorld no longer crashes if the camera bounds are nulled (thanks @wayfu #1143)
|
||||
* Fixed the resolution uniform type in the SampleFilter (thanks @VictoryRice #1137)
|
||||
* Calling P2.Body.destroy or ArcadePhysics.Body.destroy wouldn't null the parent sprite body, causing it to error in the next update (thanks @jonathanhooker #1077)
|
||||
|
||||
### p2.js 0.6.0 Changes and New Features
|
||||
|
||||
|
|
|
@ -533,6 +533,7 @@ Phaser.Physics.Arcade.Body.prototype = {
|
|||
*/
|
||||
destroy: function () {
|
||||
|
||||
this.sprite.body = null;
|
||||
this.sprite = null;
|
||||
|
||||
},
|
||||
|
|
|
@ -774,7 +774,7 @@ Phaser.Physics.P2.Body.prototype = {
|
|||
}
|
||||
|
||||
this.debugBody = null;
|
||||
|
||||
this.sprite.body = null;
|
||||
this.sprite = null;
|
||||
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue