Skip to content

Commit c97a590

Browse files
committed
Fixed this return types for Phaser.GameObjects.Components.PathFollower
1 parent 87bf4bd commit c97a590

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

src/gameobjects/components/PathFollower.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ var PathFollower = {
110110
* @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time.
111111
* @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower.
112112
*
113-
* @return {Phaser.GameObjects.PathFollower} This Game Object.
113+
* @return {this} This Game Object.
114114
*/
115115
setPath: function (path, config)
116116
{
@@ -142,7 +142,7 @@ var PathFollower = {
142142
* @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path.
143143
* @param {number} [offset=0] - Rotation offset in degrees.
144144
*
145-
* @return {Phaser.GameObjects.PathFollower} This Game Object.
145+
* @return {this} This Game Object.
146146
*/
147147
setRotateToPath: function (value, offset)
148148
{
@@ -181,7 +181,7 @@ var PathFollower = {
181181
* @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object.
182182
* @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1.
183183
*
184-
* @return {Phaser.GameObjects.PathFollower} This Game Object.
184+
* @return {this} This Game Object.
185185
*/
186186
startFollow: function (config, startAt)
187187
{
@@ -271,7 +271,7 @@ var PathFollower = {
271271
* @method Phaser.GameObjects.Components.PathFollower#pauseFollow
272272
* @since 3.3.0
273273
*
274-
* @return {Phaser.GameObjects.PathFollower} This Game Object.
274+
* @return {this} This Game Object.
275275
*/
276276
pauseFollow: function ()
277277
{
@@ -293,7 +293,7 @@ var PathFollower = {
293293
* @method Phaser.GameObjects.Components.PathFollower#resumeFollow
294294
* @since 3.3.0
295295
*
296-
* @return {Phaser.GameObjects.PathFollower} This Game Object.
296+
* @return {this} This Game Object.
297297
*/
298298
resumeFollow: function ()
299299
{
@@ -315,7 +315,7 @@ var PathFollower = {
315315
* @method Phaser.GameObjects.Components.PathFollower#stopFollow
316316
* @since 3.3.0
317317
*
318-
* @return {Phaser.GameObjects.PathFollower} This Game Object.
318+
* @return {this} This Game Object.
319319
*/
320320
stopFollow: function ()
321321
{

types/phaser.d.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11321,13 +11321,13 @@ declare namespace Phaser {
1132111321
* @param path The Path this PathFollower is following. It can only follow one Path at a time.
1132211322
* @param config Settings for the PathFollower.
1132311323
*/
11324-
setPath(path: Phaser.Curves.Path, config?: number | Phaser.Types.GameObjects.PathFollower.PathConfig | Phaser.Types.Tweens.NumberTweenBuilderConfig): Phaser.GameObjects.PathFollower;
11324+
setPath(path: Phaser.Curves.Path, config?: number | Phaser.Types.GameObjects.PathFollower.PathConfig | Phaser.Types.Tweens.NumberTweenBuilderConfig): this;
1132511325
/**
1132611326
* Set whether the PathFollower should automatically rotate to point in the direction of the Path.
1132711327
* @param value Whether the PathFollower should automatically rotate to point in the direction of the Path.
1132811328
* @param offset Rotation offset in degrees. Default 0.
1132911329
*/
11330-
setRotateToPath(value: boolean, offset?: number): Phaser.GameObjects.PathFollower;
11330+
setRotateToPath(value: boolean, offset?: number): this;
1133111331
/**
1133211332
* Is this PathFollower actively following a Path or not?
1133311333
*
@@ -11339,24 +11339,24 @@ declare namespace Phaser {
1133911339
* @param config The duration of the follow, or a PathFollower config object. Default {}.
1134011340
* @param startAt Optional start position of the follow, between 0 and 1. Default 0.
1134111341
*/
11342-
startFollow(config?: number | Phaser.Types.GameObjects.PathFollower.PathConfig | Phaser.Types.Tweens.NumberTweenBuilderConfig, startAt?: number): Phaser.GameObjects.PathFollower;
11342+
startFollow(config?: number | Phaser.Types.GameObjects.PathFollower.PathConfig | Phaser.Types.Tweens.NumberTweenBuilderConfig, startAt?: number): this;
1134311343
/**
1134411344
* Pauses this PathFollower. It will still continue to render, but it will remain motionless at the
1134511345
* point on the Path at which you paused it.
1134611346
*/
11347-
pauseFollow(): Phaser.GameObjects.PathFollower;
11347+
pauseFollow(): this;
1134811348
/**
1134911349
* Resumes a previously paused PathFollower.
1135011350
*
1135111351
* If the PathFollower was not paused this has no effect.
1135211352
*/
11353-
resumeFollow(): Phaser.GameObjects.PathFollower;
11353+
resumeFollow(): this;
1135411354
/**
1135511355
* Stops this PathFollower from following the path any longer.
1135611356
*
1135711357
* This will invoke any 'stop' conditions that may exist on the Path, or for the follower.
1135811358
*/
11359-
stopFollow(): Phaser.GameObjects.PathFollower;
11359+
stopFollow(): this;
1136011360
/**
1136111361
* Internal update handler that advances this PathFollower along the path.
1136211362
*
@@ -21999,14 +21999,14 @@ declare namespace Phaser {
2199921999
* @param path The Path this PathFollower is following. It can only follow one Path at a time.
2200022000
* @param config Settings for the PathFollower.
2200122001
*/
22002-
setPath(path: Phaser.Curves.Path, config?: number | Phaser.Types.GameObjects.PathFollower.PathConfig | Phaser.Types.Tweens.NumberTweenBuilderConfig): Phaser.GameObjects.PathFollower;
22002+
setPath(path: Phaser.Curves.Path, config?: number | Phaser.Types.GameObjects.PathFollower.PathConfig | Phaser.Types.Tweens.NumberTweenBuilderConfig): this;
2200322003

2200422004
/**
2200522005
* Set whether the PathFollower should automatically rotate to point in the direction of the Path.
2200622006
* @param value Whether the PathFollower should automatically rotate to point in the direction of the Path.
2200722007
* @param offset Rotation offset in degrees. Default 0.
2200822008
*/
22009-
setRotateToPath(value: boolean, offset?: number): Phaser.GameObjects.PathFollower;
22009+
setRotateToPath(value: boolean, offset?: number): this;
2201022010

2201122011
/**
2201222012
* Is this PathFollower actively following a Path or not?
@@ -22020,27 +22020,27 @@ declare namespace Phaser {
2202022020
* @param config The duration of the follow, or a PathFollower config object. Default {}.
2202122021
* @param startAt Optional start position of the follow, between 0 and 1. Default 0.
2202222022
*/
22023-
startFollow(config?: number | Phaser.Types.GameObjects.PathFollower.PathConfig | Phaser.Types.Tweens.NumberTweenBuilderConfig, startAt?: number): Phaser.GameObjects.PathFollower;
22023+
startFollow(config?: number | Phaser.Types.GameObjects.PathFollower.PathConfig | Phaser.Types.Tweens.NumberTweenBuilderConfig, startAt?: number): this;
2202422024

2202522025
/**
2202622026
* Pauses this PathFollower. It will still continue to render, but it will remain motionless at the
2202722027
* point on the Path at which you paused it.
2202822028
*/
22029-
pauseFollow(): Phaser.GameObjects.PathFollower;
22029+
pauseFollow(): this;
2203022030

2203122031
/**
2203222032
* Resumes a previously paused PathFollower.
2203322033
*
2203422034
* If the PathFollower was not paused this has no effect.
2203522035
*/
22036-
resumeFollow(): Phaser.GameObjects.PathFollower;
22036+
resumeFollow(): this;
2203722037

2203822038
/**
2203922039
* Stops this PathFollower from following the path any longer.
2204022040
*
2204122041
* This will invoke any 'stop' conditions that may exist on the Path, or for the follower.
2204222042
*/
22043-
stopFollow(): Phaser.GameObjects.PathFollower;
22043+
stopFollow(): this;
2204422044

2204522045
/**
2204622046
* Internal update handler that advances this PathFollower along the path.

0 commit comments

Comments
 (0)