Simply add type info to jsdoc of these classs.

This commit is contained in:
Sean
2013-05-12 00:26:30 +08:00
parent 0adbf1d92f
commit 1c311a73df
14 changed files with 519 additions and 393 deletions
+55
View File
@@ -26,20 +26,64 @@ module Phaser {
private _game: Game;
/**
*
* @type {Mouse}
*/
public mouse: Mouse;
/**
*
* @type {Keyboard}
*/
public keyboard: Keyboard;
/**
*
* @type {Touch}
*/
public touch: Touch;
/**
*
* @type {Number}
*/
public x: number = 0;
/**
*
* @type {Number}
*/
public y: number = 0;
/**
*
* @type {Number}
*/
public scaleX: number = 1;
/**
*
* @type {Number}
*/
public scaleY: number = 1;
/**
*
* @type {Number}
*/
public worldX: number = 0;
/**
*
* @type {Number}
*/
public worldY: number = 0;
/**
*
* @type {Phaser.Signal}
*/
public onDown: Phaser.Signal;
/**
*
* @type {Phaser.Signal}
*/
public onUp: Phaser.Signal;
public update() {
@@ -63,18 +107,29 @@ module Phaser {
}
/**
* @param {Camera} [camera]
*/
public getWorldX(camera?: Camera = this._game.camera) {
return camera.worldView.x + this.x;
}
/**
* @param {Camera} [camera]
*/
public getWorldY(camera?: Camera = this._game.camera) {
return camera.worldView.y + this.y;
}
/**
* @param {Number} x
* @param {Number} y
* @param {String} [color]
*/
public renderDebugInfo(x: number, y: number, color?: string = 'rgb(255,255,255)') {
this._game.stage.context.font = '14px Courier';