Skip to content

Commit 3f0ee70

Browse files
committed
Renamed methods to avoid confliction with Animation component
1 parent db613c7 commit 3f0ee70

2 files changed

Lines changed: 19 additions & 16 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ A special mention must go to @orblazer for their outstanding assistance in helpi
3030
* Camera.fadeIn is a new method that will fade the camera in from a given color (black by default) and then optionally invoke a callback. This is the same as using Camera.flash but with an easier to grok method name. Fix #3412 (thanks @Jerenaux)
3131
* Camera.fadeOut is a new method that will fade the camera out to a given color (black by default) and then optionally invoke a callback. This is the same as using Camera.fade but with an easier to grok method name. Fix #3412 (thanks @Jerenaux)
3232
* Groups will now listen for a `destroy` event from any Game Object added to them, and if received will automatically remove that GameObject from the Group. Fix #3418 (thanks @hadikcz)
33-
* MatterGameObject is a new function, available via the Matter Factory in `this.matter.add.gameObject`, that will inject a Matter JS Body into any Game Object, such as a Text object.
33+
* MatterGameObject is a new function, available via the Matter Factory in `this.matter.add.gameObject`, that will inject a Matter JS Body into any Game Object, such as a Text or TileSprite object.
3434
* Matter.SetBody and SetExistingBody will now set the origin of the Game Object to be the Matter JS sprite.xOffset and yOffset values, which will auto-center the Game Object to the origin of the body, regardless of shape.
3535

3636
### Bug Fixes
@@ -100,7 +100,11 @@ A special mention must go to @orblazer for their outstanding assistance in helpi
100100
* Triangle.getLineC now returns a Line instead of an untyped object. It also now has an optional argument that allows you to pass a Line in to be populated, rather than creating a new one.
101101
* The GameObject `destroy` event is now emitted at the start of the destroy process, before things like the body or input managers have been removed, so you're able to use the event handler to extract any information you require from the GameObject before it's actually disposed of. Previously, the event was dispatched at the very end of the process.
102102
* Phaser 3 is now built with Webpack v4.1.1 and all related packages have been updated (thanks @orblazer)
103-
103+
* On WebGL the currentScissor is now updated when the renderer `resize` method is called (thanks @jmcriat)
104+
* PathFollower.start has been renamed to `startFollow` to avoid conflicting with the Animation component.
105+
* PathFollower.pause has been renamed to `pauseFollow` to avoid conflicting with the Animation component.
106+
* PathFollower.resume has been renamed to `resumeFollow` to avoid conflicting with the Animation component.
107+
* PathFollower.stop has been renamed to `stopFollow` to avoid conflicting with the Animation component.
104108

105109

106110

src/gameobjects/pathfollower/PathFollower.js

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -170,15 +170,14 @@ var PathFollower = new Class({
170170
return this;
171171
},
172172

173-
// rotation offset in degrees
174173
/**
175174
* [description]
176175
*
177176
* @method Phaser.GameObjects.PathFollower#setRotateToPath
178177
* @since 3.0.0
179178
*
180179
* @param {number} value - [description]
181-
* @param {number} [offset=0] - [description]
180+
* @param {number} [offset=0] - Rotation offset in degrees.
182181
* @param {boolean} [verticalAdjust=false] - [description]
183182
*
184183
* @return {Phaser.GameObjects.PathFollower} This Game Object.
@@ -215,15 +214,15 @@ var PathFollower = new Class({
215214
/**
216215
* Starts this PathFollower following its given Path.
217216
*
218-
* @method Phaser.GameObjects.PathFollower#start
219-
* @since 3.0.0
217+
* @method Phaser.GameObjects.PathFollower#startFollow
218+
* @since 3.3.0
220219
*
221220
* @param {object} config - [description]
222221
* @param {number} [startAt=0] - [description]
223222
*
224223
* @return {Phaser.GameObjects.PathFollower} This Game Object.
225224
*/
226-
start: function (config, startAt)
225+
startFollow: function (config, startAt)
227226
{
228227
if (config === undefined) { config = {}; }
229228
if (startAt === undefined) { startAt = 0; }
@@ -285,12 +284,12 @@ var PathFollower = new Class({
285284
* Pauses this PathFollower. It will still continue to render, but it will remain motionless at the
286285
* point on the Path at which you paused it.
287286
*
288-
* @method Phaser.GameObjects.PathFollower#pause
289-
* @since 3.0.0
287+
* @method Phaser.GameObjects.PathFollower#pauseFollow
288+
* @since 3.3.0
290289
*
291290
* @return {Phaser.GameObjects.PathFollower} This Game Object.
292291
*/
293-
pause: function ()
292+
pauseFollow: function ()
294293
{
295294
var tween = this.pathTween;
296295

@@ -306,12 +305,12 @@ var PathFollower = new Class({
306305
* Resumes a previously paused PathFollower.
307306
* If the PathFollower was not paused this has no effect.
308307
*
309-
* @method Phaser.GameObjects.PathFollower#resume
310-
* @since 3.0.0
308+
* @method Phaser.GameObjects.PathFollower#resumeFollow
309+
* @since 3.3.0
311310
*
312311
* @return {Phaser.GameObjects.PathFollower} This Game Object.
313312
*/
314-
resume: function ()
313+
resumeFollow: function ()
315314
{
316315
var tween = this.pathTween;
317316

@@ -327,12 +326,12 @@ var PathFollower = new Class({
327326
* Stops this PathFollower from following the path any longer.
328327
* This will invoke any 'stop' conditions that may exist on the Path, or for the follower.
329328
*
330-
* @method Phaser.GameObjects.PathFollower#stop
331-
* @since 3.0.0
329+
* @method Phaser.GameObjects.PathFollower#stopFollow
330+
* @since 3.3.0
332331
*
333332
* @return {Phaser.GameObjects.PathFollower} This Game Object.
334333
*/
335-
stop: function ()
334+
stopFollow: function ()
336335
{
337336
var tween = this.pathTween;
338337

0 commit comments

Comments
 (0)