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
The Animation.play and playReverse methods have a new optional parameter timeScale. This allows you to set the Animations time scale as you're actually playing it, rather than having to chain two calls together. Closephaserjs#3963
Copy file name to clipboardExpand all lines: src/gameobjects/components/Animation.js
+11-3Lines changed: 11 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -522,13 +522,15 @@ var Animation = new Class({
522
522
* @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance.
523
523
* @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.
524
524
* @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.
525
+
* @param {number} [timeScale] - Set the Time Scale when starting this Animation. If not given, the Time Scale will use the current value.
525
526
*
526
527
* @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.
* @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance.
559
562
* @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call.
560
563
* @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.
564
+
* @param {number} [timeScale] - Set the Time Scale when starting this Animation. If not given, the Time Scale will use the current value.
561
565
*
562
566
* @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.
0 commit comments