n-way collision checks and onBeginContact and onEndContact done and working. Also fixed issue in TweenManager.removeAll.

This commit is contained in:
photonstorm
2014-02-05 02:39:03 +00:00
parent 4502ca1bf6
commit 84f0f00f49
10 changed files with 492 additions and 286 deletions
+4
View File
@@ -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 = {
+5
View File
@@ -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;