mirror of
https://github.com/wassname/phaser.git
synced 2026-06-30 16:40:20 +08:00
n-way collision checks and onBeginContact and onEndContact done and working. Also fixed issue in TweenManager.removeAll.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
Phaser.Events = function (sprite) {
|
||||
|
||||
this.parent = sprite;
|
||||
|
||||
this.onAddedToGroup = new Phaser.Signal();
|
||||
this.onRemovedFromGroup = new Phaser.Signal();
|
||||
this.onKilled = new Phaser.Signal();
|
||||
@@ -41,6 +42,9 @@ Phaser.Events = function (sprite) {
|
||||
this.onAnimationComplete = null;
|
||||
this.onAnimationLoop = null;
|
||||
|
||||
this.onBeginContact = null;
|
||||
this.onEndContact = null;
|
||||
|
||||
};
|
||||
|
||||
Phaser.Events.prototype = {
|
||||
|
||||
@@ -934,6 +934,11 @@ Phaser.Sprite.prototype.destroy = function() {
|
||||
this.animations.destroy();
|
||||
}
|
||||
|
||||
if (this.body)
|
||||
{
|
||||
this.body.destroy();
|
||||
}
|
||||
|
||||
this.alive = false;
|
||||
this.exists = false;
|
||||
this.visible = false;
|
||||
|
||||
Reference in New Issue
Block a user