mirror of
https://github.com/wassname/phaser.git
synced 2026-08-14 12:40:17 +08:00
Updated DynamicTexture.setPixel, added GameMath.shuffleArray, fixed Animation.frame and created a few new tests
This commit is contained in:
@@ -86,8 +86,9 @@ module Phaser {
|
||||
* @param frameRate {number} The speed in frames per second that the animation should play at (e.g. 60 fps).
|
||||
* @param loop {boolean} Whether or not the animation is looped or just plays once.
|
||||
* @param useNumericIndex {boolean} Use number indexes instead of string indexes?
|
||||
* @return {Animation} The Animation that was created
|
||||
*/
|
||||
public add(name: string, frames: any[] = null, frameRate: number = 60, loop: bool = false, useNumericIndex: bool = true) {
|
||||
public add(name: string, frames: any[] = null, frameRate: number = 60, loop: bool = false, useNumericIndex: bool = true): Animation {
|
||||
|
||||
if (this._frameData == null)
|
||||
{
|
||||
@@ -117,6 +118,8 @@ module Phaser {
|
||||
this.currentAnim = this._anims[name];
|
||||
this.currentFrame = this.currentAnim.currentFrame;
|
||||
|
||||
return this._anims[name];
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user