Finish document for AnimationManager, Tile, FrameData, BootScreen, PauseScreen.

This commit is contained in:
Sean
2013-05-10 16:31:15 +01:00
committed by Richard Davey
parent 1052df6660
commit e88c48641d
5 changed files with 45 additions and 42 deletions
+8 -8
View File
@@ -14,10 +14,10 @@ module Phaser {
* Tile constructor
* Create a new <code>Tile</code>.
*
* @param tilemap the tilemap this tile belongs to.
* @param index The index of this tile type in the core map data.
* @param width Width of the tile.
* @param height Height of the tile.
* @param tilemap {Tilemap} the tilemap this tile belongs to.
* @param index {number} The index of this tile type in the core map data.
* @param width {number} Width of the tile.
* @param height number} Height of the tile.
*/
constructor(game: Game, tilemap: Tilemap, index: number, width: number, height: number) {
@@ -121,10 +121,10 @@ module Phaser {
/**
* Set collision configs.
* @param collision Bit field of flags. (see Tile.allowCollision)
* @param resetCollisions Reset collision flags before set.
* @param separateX Enable seprate at x-axis.
* @param separateY Enable seprate at y-axis.
* @param collision {number} Bit field of flags. (see Tile.allowCollision)
* @param resetCollisions {boolean} Reset collision flags before set.
* @param separateX {boolean} Enable seprate at x-axis.
* @param separateY {boolean} Enable seprate at y-axis.
*/
public setCollision(collision: number, resetCollisions: bool, separateX: bool, separateY: bool) {
+18 -18
View File
@@ -35,8 +35,8 @@ module Phaser {
/**
* Add a new frame.
* @param frame The frame you want to add.
* @return {Frame=} The frame you just added.
* @param frame {Frame} The frame you want to add.
* @return {Frame} The frame you just added.
*/
public addFrame(frame: Frame): Frame {
@@ -55,8 +55,8 @@ module Phaser {
/**
* Get a frame by its index.
* @param index Index of the frame you want to get.
* @return {Frame=} The frame you want.
* @param index {number} Index of the frame you want to get.
* @return {Frame} The frame you want.
*/
public getFrame(index: number): Frame {
@@ -71,8 +71,8 @@ module Phaser {
/**
* Get a frame by its name.
* @param name Name of the frame you want to get.
* @return {Frame=} The frame you want.
* @param name {string} Name of the frame you want to get.
* @return {Frame} The frame you want.
*/
public getFrameByName(name: string): Frame {
@@ -87,7 +87,7 @@ module Phaser {
/**
* Check whether there's a frame with given name.
* @param name Name of the frame you want to check.
* @param name {string} Name of the frame you want to check.
* @return {boolean} True if frame with given name found, otherwise return false.
*/
public checkFrameName(name: string): bool {
@@ -103,10 +103,10 @@ module Phaser {
/**
* Get ranges of frames in an array.
* @param start Start index of frames you want.
* @param end End index of frames you want.
* @param output Optional, result will be added into this array.
* @return {array} Ranges of specific frames in an array.
* @param start {number} Start index of frames you want.
* @param end {number} End index of frames you want.
* @param output {Frame[]} Optional, result will be added into this array.
* @return {Frame[]} Ranges of specific frames in an array.
*/
public getFrameRange(start: number, end: number, output?: Frame[] = []): Frame[] {
@@ -121,8 +121,8 @@ module Phaser {
/**
* Get all indexes of frames by giving their name.
* @param output Optional, result will be added into this array.
* @return {array} Indexes of specific frames in an array.
* @param output {number[]} Optional, result will be added into this array.
* @return {number[]} Indexes of specific frames in an array.
*/
public getFrameIndexes(output?: number[] = []): number[] {
@@ -139,8 +139,8 @@ module Phaser {
/**
* Get all names of frames by giving their indexes.
* @param output Optional, result will be added into this array.
* @return {array} Names of specific frames in an array.
* @param output {number[]} Optional, result will be added into this array.
* @return {number[]} Names of specific frames in an array.
*/
public getFrameIndexesByName(input: string[]): number[] {
@@ -160,7 +160,7 @@ module Phaser {
/**
* Get all frames in this frame data.
* @return {array} All the frames in an array.
* @return {Frame[]} All the frames in an array.
*/
public getAllFrames(): Frame[] {
return this._frames;
@@ -168,8 +168,8 @@ module Phaser {
/**
* Get All frames with specific ranges.
* @param range Ranges in an array.
* @return All frames in an array.
* @param range {number[]} Ranges in an array.
* @return {Frame[]} All frames in an array.
*/
public getFrames(range: number[]) {
+2 -3
View File
@@ -12,11 +12,10 @@ module Phaser {
/**
* BootScreen constructor
*
* Create a new <code>BootScreen</code> with specific width and height.
*
* @param width Screen canvas width.
* @param height Screen canvas height.
* @param width {number} Screen canvas width.
* @param height {number} Screen canvas height.
*/
constructor(game:Game) {
+2 -3
View File
@@ -12,11 +12,10 @@ module Phaser {
/**
* PauseScreen constructor
*
* Create a new <code>PauseScreen</code> with specific width and height.
*
* @param width Screen canvas width.
* @param height Screen canvas height.
* @param width {number} Screen canvas width.
* @param height {number} Screen canvas height.
*/
constructor(game: Game, width: number, height: number) {