You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object.
178
178
* @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call.
179
-
* @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.
* @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object.
230
229
* @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call.
231
-
* @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.
* @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object.
253
257
* @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing.
258
+
*
259
+
* @return {this} This Game Object.
260
+
*/
261
+
playAfterDelay: function(key,delay)
262
+
{
263
+
returnthis.anims.playAfterDelay(key,delay);
264
+
},
265
+
266
+
/**
267
+
* Waits for the current animation to complete one 'repeat' cycle, then starts playback of the given animation.
268
+
*
269
+
* You can use this to ensure there are no harsh 'jumps' between two sets of animations, i.e. going from an
270
+
* idle animation to a walking animation.
271
+
*
272
+
* If no animation is currently running, the given one will start immediately.
* @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object.
255
-
* @param {integer} [startFrame=0] - The frame of the animation to start from.
281
+
* @param {integer} [repeatCount=1] - How many times should the animation repeat before the next one starts?
* Sets an animation, or an array of animations, to be played immediately after the current one completes or stops.
292
+
*
293
+
* The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc,
294
+
* or have the `stop` method called directly on it.
295
+
*
296
+
* An animation set to repeat forever will never enter a completed state.
297
+
*
298
+
* You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` event).
299
+
*
300
+
* Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing.
301
+
*
302
+
* Call this method with no arguments to reset all currently chained animations.
303
+
*
304
+
* @method Phaser.GameObjects.Sprite#chain
305
+
* @since 3.50.0
306
+
*
307
+
* @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig|string[]|Phaser.Animations.Animation[]|Phaser.Types.Animations.PlayAnimationConfig[])} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object, or an array of them.
308
+
*
309
+
* @return {this} This Game Object.
310
+
*/
311
+
chain: function(key)
312
+
{
313
+
returnthis.anims.chain(key);
262
314
},
263
315
264
316
/**
@@ -281,6 +333,82 @@ var Sprite = new Class({
281
333
returnthis.anims.stop();
282
334
},
283
335
336
+
/**
337
+
* Stops the current animation from playing after the specified time delay, given in milliseconds.
338
+
*
339
+
* It then dispatches the `ANIMATION_STOP` series of events.
340
+
*
341
+
* If no animation is running, no events will be dispatched.
342
+
*
343
+
* If there is another animation in the queue (set via the `chain` method) then it will start playing,
0 commit comments