mirror of
https://github.com/wassname/phaser.git
synced 2026-09-09 11:28:47 +08:00
Re-format optional parameters.
This commit is contained in:
@@ -19,7 +19,7 @@ module Phaser {
|
||||
*
|
||||
* @param X {number} The X position of the emitter.
|
||||
* @param Y {number} The Y position of the emitter.
|
||||
* @param Size {number} Optional, specifies a maximum capacity for this emitter.
|
||||
* @param [Size] {number} specifies a maximum capacity for this emitter.
|
||||
*/
|
||||
constructor(game: Game, X: number = 0, Y: number = 0, Size: number = 0) {
|
||||
super(game, Size);
|
||||
|
||||
@@ -19,10 +19,10 @@ module Phaser {
|
||||
* Create a new <code>GameObject</code> object at specific position with
|
||||
* specific width and height.
|
||||
*
|
||||
* @param x {number} Optinal, the x position of the object.
|
||||
* @param y {number} Optinal, the y position of the object.
|
||||
* @param width {number} Optinal, the width of the object.
|
||||
* @param height {number} Optinal, the height of the object.
|
||||
* @param [x] {number} The x position of the object.
|
||||
* @param [y] {number} The y position of the object.
|
||||
* @param [width] {number} The width of the object.
|
||||
* @param [height] {number} The height of the object.
|
||||
*/
|
||||
constructor(game: Game, x?: number = 0, y?: number = 0, width?: number = 16, height?: number = 16) {
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@ module Phaser {
|
||||
* Create a new <code>GeomSprite</code>.
|
||||
*
|
||||
* @param game {Phaser.Game} Current game instance.
|
||||
* @param x {number} Optional, the initial x position of the sprite.
|
||||
* @param y {number} Optional, the initial y position of the sprite.
|
||||
* @param [x] {number} the initial x position of the sprite.
|
||||
* @param [y] {number} the initial y position of the sprite.
|
||||
*/
|
||||
constructor(game: Game, x?: number = 0, y?: number = 0) {
|
||||
|
||||
@@ -468,7 +468,7 @@ module Phaser {
|
||||
* @param point {Point} Position of the point.
|
||||
* @param offsetX {number} X offset to its position.
|
||||
* @param offsetY {number} Y offset to its position.
|
||||
* @param size {number} Optional, point size.
|
||||
* @param [size] {number} point size.
|
||||
*/
|
||||
public renderPoint(point, offsetX?: number = 0, offsetY?: number = 0, size?: number = 1) {
|
||||
|
||||
@@ -480,7 +480,7 @@ module Phaser {
|
||||
* Render debug infos. (this method does not work now)
|
||||
* @param x {number} X position of the debug info to be rendered.
|
||||
* @param y {number} Y position of the debug info to be rendered.
|
||||
* @param color {number} Optional, color of the debug info to be rendered. (format is css color string)
|
||||
* @param [color] {number} color of the debug info to be rendered. (format is css color string)
|
||||
*/
|
||||
public renderDebugInfo(x: number, y: number, color?: string = 'rgb(255,255,255)') {
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@ module Phaser {
|
||||
* @param key {string} Asset key for image texture of this object.
|
||||
* @param x {number} X position in world coordinate.
|
||||
* @param y {number} Y position in world coordinate.
|
||||
* @param width {number} Optional, width of this object.
|
||||
* @param height {number} Optional, height of this object.
|
||||
* @param [width] {number} width of this object.
|
||||
* @param [height] {number} height of this object.
|
||||
*/
|
||||
constructor(game: Game, key:string, x: number = 0, y: number = 0, width?: number = 0, height?: number = 0) {
|
||||
|
||||
@@ -113,8 +113,8 @@ module Phaser {
|
||||
* @param y {number} Y position of the new region.
|
||||
* @param width {number} Width of the new region.
|
||||
* @param height {number} Height of the new region.
|
||||
* @param speedX {number} Optional, x-axis scrolling speed.
|
||||
* @param speedY {number} Optional, y-axis scrolling speed.
|
||||
* @param [speedX] {number} x-axis scrolling speed.
|
||||
* @param [speedY] {number} y-axis scrolling speed.
|
||||
* @return {ScrollRegion} The newly added region.
|
||||
*/
|
||||
public addRegion(x: number, y: number, width: number, height: number, speedX?:number = 0, speedY?:number = 0):ScrollRegion {
|
||||
|
||||
@@ -19,9 +19,9 @@ module Phaser {
|
||||
* Create a new <code>Sprite</code>.
|
||||
*
|
||||
* @param game {Phaser.Game} Current game instance.
|
||||
* @param x {number} Optional, the initial x position of the sprite.
|
||||
* @param y {number} Optional, the initial y position of the sprite.
|
||||
* @param key {string} Optional, Key of the graphic you want to load for this sprite.
|
||||
* @param [x] {number} the initial x position of the sprite.
|
||||
* @param [y] {number} the initial y position of the sprite.
|
||||
* @param [key] {string} Key of the graphic you want to load for this sprite.
|
||||
*/
|
||||
constructor(game: Game, x?: number = 0, y?: number = 0, key?: string = null) {
|
||||
|
||||
@@ -140,7 +140,7 @@ module Phaser {
|
||||
* This function creates a flat colored square image dynamically.
|
||||
* @param width {number} The width of the sprite you want to generate.
|
||||
* @param height {number} The height of the sprite you want to generate.
|
||||
* @param color {number} Optional, specifies the color of the generated block. (format is 0xAARRGGBB)
|
||||
* @param [color] {number} specifies the color of the generated block. (format is 0xAARRGGBB)
|
||||
* @return {Sprite} Sprite instance itself.
|
||||
*/
|
||||
public makeGraphic(width: number, height: number, color: number = 0xffffffff): Sprite {
|
||||
@@ -413,7 +413,7 @@ module Phaser {
|
||||
* Render debug infos. (including name, bounds info, position and some other properties)
|
||||
* @param x {number} X position of the debug info to be rendered.
|
||||
* @param y {number} Y position of the debug info to be rendered.
|
||||
* @param color {number} Optional, color of the debug info to be rendered. (format is css color string)
|
||||
* @param [color] {number} color of the debug info to be rendered. (format is css color string)
|
||||
*/
|
||||
public renderDebugInfo(x: number, y: number, color?: string = 'rgb(255,255,255)') {
|
||||
|
||||
|
||||
@@ -315,7 +315,7 @@ module Phaser {
|
||||
* Get the tile located at specific position and layer.
|
||||
* @param x {number} X position of this tile located.
|
||||
* @param y {number} Y position of this tile located.
|
||||
* @param layer {number} Optional, layer of this tile located.
|
||||
* @param [layer] {number} layer of this tile located.
|
||||
* @return {Tile} The tile with specific properties.
|
||||
*/
|
||||
public getTile(x: number, y: number, layer?: number = 0):Tile {
|
||||
@@ -328,7 +328,7 @@ module Phaser {
|
||||
* Get the tile located at specific position (in world coordinate) and layer. (thus you give a position of a point which is within the tile)
|
||||
* @param x {number} X position of the point in target tile.
|
||||
* @param x {number} Y position of the point in target tile.
|
||||
* @param layer {number} Optional, layer of this tile located.
|
||||
* @param [layer] {number} layer of this tile located.
|
||||
* @return {Tile} The tile with specific properties.
|
||||
*/
|
||||
public getTileFromWorldXY(x: number, y: number, layer?: number = 0):Tile {
|
||||
@@ -417,7 +417,7 @@ module Phaser {
|
||||
* @param x {number} X position of this tile.
|
||||
* @param y {number} Y position of this tile.
|
||||
* @param index {number} The index of this tile type in the core map data.
|
||||
* @param layer {number} Optional, which layer you want to set the tile to.
|
||||
* @param [layer] {number} which layer you want to set the tile to.
|
||||
*/
|
||||
public putTile(x: number, y: number, index: number, layer?: number = 0) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user