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
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -135,6 +135,7 @@ Version 2.0.4 - "Mos Shirare" - in development
135
135
* Color.HSLColorWheel will return an array with 360 color objects for each segment of an HSL color wheel, you can optionally set the saturation and lightness amounts.
136
136
* Timer.timeCap is a new setting allowing your Timers to protect against unexpectedly large delta timers (such as raf de-vis or CPU grind).
137
137
* Camera.unfollow allows you to easily unfollow a tracked object (thanks @alvinsight, #755)
138
+
* Animation.setFrame allows you to set the animation to a specific frame (thanks @adamholdenyall, #706)
* Sets this animations playback to a given frame with the given ID.
228
+
*
229
+
* @method Phaser.Animation#setFrame
230
+
* @param {string|number} [frameId] - The identifier of the frame to set. Can be the name of the frame, the sprite index of the frame, or the animation-local frame index.
231
+
* @param {boolean} [useLocalFrameIndex=false] - If you provide a number for frameId, should it use the numeric indexes of the frameData, or the 0-indexed frame index local to the animation.
// Set the current frame index to the found index. Subtract 1 so that it animates to the desired frame on update.
274
+
this._frameIndex=frameIndex-1;
275
+
276
+
// Make the animation update at next update
277
+
this._timeNextFrame=this.game.time.now;
278
+
279
+
this.update();
280
+
}
281
+
282
+
},
283
+
226
284
/**
227
285
* Stops playback of this animation and set it to a finished state. If a resetFrame is provided it will stop playback and set frame to the first in the animation.
228
286
* If `dispatchComplete` is true it will dispatch the complete events, otherwise they'll be ignored.
0 commit comments