From ec3fc8f307529fa8eda3aa802c5abce9c57f3e46 Mon Sep 17 00:00:00 2001 From: Cameron Foale Date: Fri, 20 Sep 2013 17:39:02 +1000 Subject: [PATCH 1/2] Fixes numeric frame indexes on animations --- src/animation/FrameData.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/animation/FrameData.js b/src/animation/FrameData.js index 4a975830..25046635 100644 --- a/src/animation/FrameData.js +++ b/src/animation/FrameData.js @@ -209,7 +209,7 @@ Phaser.Animation.FrameData.prototype = { // Does the frames array contain names or indexes? if (useNumericIndex) { - output.push(frames[i].index); + output.push(frames[i]); } else { From 61b9e119cbc202b4a8433fb97a5f23a81df9ccec Mon Sep 17 00:00:00 2001 From: Cameron Foale Date: Fri, 20 Sep 2013 17:48:38 +1000 Subject: [PATCH 2/2] Incorrect input array in FrameData.getFrames --- src/animation/FrameData.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/animation/FrameData.js b/src/animation/FrameData.js index 25046635..b4f5d407 100644 --- a/src/animation/FrameData.js +++ b/src/animation/FrameData.js @@ -164,12 +164,12 @@ Phaser.Animation.FrameData.prototype = { if (useNumericIndex) { // The actual frame - output.push(this.getFrame(input[i])); + output.push(this.getFrame(frames[i])); } else { // The actual frame - output.push(this.getFrameByName(input[i])); + output.push(this.getFrameByName(frames[i])); } } }