Fixed this return types for Phaser.GameObjects.Zone

This commit is contained in:
Jason Kwok 2020-01-26 21:52:37 +08:00
parent 8e82f22858
commit ec25759747
2 changed files with 10 additions and 10 deletions

View file

@ -156,7 +156,7 @@ var Zone = new Class({
* @param {number} height - The height of this Game Object.
* @param {boolean} [resizeInput=true] - If this Zone has a Rectangle for a hit area this argument will resize the hit area as well.
*
* @return {Phaser.GameObjects.Zone} This Game Object.
* @return {this} This Game Object.
*/
setSize: function (width, height, resizeInput)
{
@ -188,7 +188,7 @@ var Zone = new Class({
* @param {number} width - The width of this Game Object.
* @param {number} height - The height of this Game Object.
*
* @return {Phaser.GameObjects.Zone} This Game Object.
* @return {this} This Game Object.
*/
setDisplaySize: function (width, height)
{
@ -207,7 +207,7 @@ var Zone = new Class({
*
* @param {number} radius - The radius of the Circle that will form the Drop Zone.
*
* @return {Phaser.GameObjects.Zone} This Game Object.
* @return {this} This Game Object.
*/
setCircleDropZone: function (radius)
{
@ -224,7 +224,7 @@ var Zone = new Class({
* @param {number} width - The width of the rectangle drop zone.
* @param {number} height - The height of the rectangle drop zone.
*
* @return {Phaser.GameObjects.Zone} This Game Object.
* @return {this} This Game Object.
*/
setRectangleDropZone: function (width, height)
{
@ -240,7 +240,7 @@ var Zone = new Class({
* @param {object} shape - A Geometry shape instance, such as Phaser.Geom.Ellipse, or your own custom shape.
* @param {Phaser.Types.Input.HitAreaCallback} callback - A function that will return `true` if the given x/y coords it is sent are within the shape.
*
* @return {Phaser.GameObjects.Zone} This Game Object.
* @return {this} This Game Object.
*/
setDropZone: function (shape, callback)
{

10
types/phaser.d.ts vendored
View file

@ -38545,7 +38545,7 @@ declare namespace Phaser {
* @param height The height of this Game Object.
* @param resizeInput If this Zone has a Rectangle for a hit area this argument will resize the hit area as well. Default true.
*/
setSize(width: number, height: number, resizeInput?: boolean): Phaser.GameObjects.Zone;
setSize(width: number, height: number, resizeInput?: boolean): this;
/**
* Sets the display size of this Game Object.
@ -38553,14 +38553,14 @@ declare namespace Phaser {
* @param width The width of this Game Object.
* @param height The height of this Game Object.
*/
setDisplaySize(width: number, height: number): Phaser.GameObjects.Zone;
setDisplaySize(width: number, height: number): this;
/**
* Sets this Zone to be a Circular Drop Zone.
* The circle is centered on this Zones `x` and `y` coordinates.
* @param radius The radius of the Circle that will form the Drop Zone.
*/
setCircleDropZone(radius: number): Phaser.GameObjects.Zone;
setCircleDropZone(radius: number): this;
/**
* Sets this Zone to be a Rectangle Drop Zone.
@ -38568,14 +38568,14 @@ declare namespace Phaser {
* @param width The width of the rectangle drop zone.
* @param height The height of the rectangle drop zone.
*/
setRectangleDropZone(width: number, height: number): Phaser.GameObjects.Zone;
setRectangleDropZone(width: number, height: number): this;
/**
* Allows you to define your own Geometry shape to be used as a Drop Zone.
* @param shape A Geometry shape instance, such as Phaser.Geom.Ellipse, or your own custom shape.
* @param callback A function that will return `true` if the given x/y coords it is sent are within the shape.
*/
setDropZone(shape: object, callback: Phaser.Types.Input.HitAreaCallback): Phaser.GameObjects.Zone;
setDropZone(shape: object, callback: Phaser.Types.Input.HitAreaCallback): this;
/**
* The depth of this Game Object within the Scene.