Lots of Tilemap updates, moved the renderer out, added components and new tests.

This commit is contained in:
Richard Davey
2013-07-02 23:41:25 +01:00
parent c647792c12
commit c81cf0c882
34 changed files with 2395 additions and 1563 deletions
+12
View File
@@ -24,10 +24,13 @@ module Phaser.Components.Sprite {
this.onKilled = new Phaser.Signal;
this.onRevived = new Phaser.Signal;
// Only create these if Sprite input is enabled?
this.onInputOver = new Phaser.Signal;
this.onInputOut = new Phaser.Signal;
this.onInputDown = new Phaser.Signal;
this.onInputUp = new Phaser.Signal;
this.onDragStart = new Phaser.Signal;
this.onDragStop = new Phaser.Signal;
}
@@ -81,6 +84,15 @@ module Phaser.Components.Sprite {
*/
public onInputUp: Phaser.Signal;
/**
* Dispatched by the Input component when the Sprite starts being dragged
*/
public onDragStart: Phaser.Signal;
/**
* Dispatched by the Input component when the Sprite stops being dragged
*/
public onDragStop: Phaser.Signal;
+3 -1
View File
@@ -595,6 +595,8 @@ module Phaser.Components.Sprite {
this.sprite.group.bringToTop(this.sprite);
}
this.sprite.events.onDragStart.dispatch(this.sprite, pointer);
}
/**
@@ -612,7 +614,7 @@ module Phaser.Components.Sprite {
this.sprite.y = Math.floor(this.sprite.y / this.snapY) * this.snapY;
}
//pointer.draggedObject = null;
this.sprite.events.onDragStop.dispatch(this.sprite, pointer);
}
/**