mirror of
https://github.com/wassname/phaser.git
synced 2026-09-12 12:40:47 +08:00
Lots of Tilemap updates, moved the renderer out, added components and new tests.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user