2013-05-31 17:21:32 +00:00
|
|
|
/// <reference path="../../Game.ts" />
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Phaser - Components - Events
|
|
|
|
*
|
2013-06-01 01:49:41 +00:00
|
|
|
* Signals that are dispatched by the Sprite and its various components
|
2013-05-31 17:21:32 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
module Phaser.Components {
|
|
|
|
|
|
|
|
export class Events {
|
|
|
|
|
2013-06-01 01:49:41 +00:00
|
|
|
constructor(parent: Sprite) {
|
2013-05-31 17:21:32 +00:00
|
|
|
|
2013-06-01 01:49:41 +00:00
|
|
|
this.game = parent.game;
|
2013-05-31 17:21:32 +00:00
|
|
|
this._sprite = parent;
|
|
|
|
|
2013-06-01 01:49:41 +00:00
|
|
|
this.onInputOver = new Phaser.Signal;
|
|
|
|
this.onInputOut = new Phaser.Signal;
|
|
|
|
this.onInputDown = new Phaser.Signal;
|
|
|
|
this.onInputUp = new Phaser.Signal;
|
2013-05-31 17:21:32 +00:00
|
|
|
|
2013-06-01 01:49:41 +00:00
|
|
|
}
|
2013-05-31 17:21:32 +00:00
|
|
|
|
2013-06-01 01:49:41 +00:00
|
|
|
public game: Game;
|
2013-05-31 17:21:32 +00:00
|
|
|
private _sprite: Sprite;
|
|
|
|
|
2013-06-01 01:49:41 +00:00
|
|
|
// Creation and destruction
|
|
|
|
public onAdded: Phaser.Signal;
|
|
|
|
public onKilled: Phaser.Signal;
|
|
|
|
public onRevived: Phaser.Signal;
|
|
|
|
|
|
|
|
public onOutOfBounds: Phaser.Signal;
|
|
|
|
|
|
|
|
// Input related events
|
2013-05-31 17:21:32 +00:00
|
|
|
public onInputOver: Phaser.Signal;
|
|
|
|
public onInputOut: Phaser.Signal;
|
|
|
|
public onInputDown: Phaser.Signal;
|
|
|
|
public onInputUp: Phaser.Signal;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|