Updated DynamicTexture.setPixel, added GameMath.shuffleArray, fixed Animation.frame and created a few new tests

This commit is contained in:
Richard Davey
2013-05-18 03:05:28 +01:00
parent 55568592b5
commit 53aa43566e
21 changed files with 529 additions and 95 deletions
+4 -1
View File
@@ -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];
}
/**