cancel reverse animation

This commit is contained in:
Kwondo Park 2018-07-23 14:21:31 +09:00 committed by GitHub
parent 98ceb32946
commit a0cc602569
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -51,7 +51,6 @@ var GetValue = require('../utils/object/GetValue');
* @property {boolean} [yoyo=false] - Should the animation yoyo? (reverse back down to the start) before repeating?
* @property {boolean} [showOnStart=false] - Should sprite.visible = true when the animation starts to play?
* @property {boolean} [hideOnComplete=false] - Should sprite.visible = false when the animation finishes?
* @property {boolean} [reverse=false] - Should the animation be played in reversed sequence?
*/
/**
@ -107,13 +106,6 @@ var Animation = new Class({
*/
this.type = 'frame';
// if config.reverse is true, reverse sequence of AnimationFrameConfig[]
var animFrames = GetValue(config, 'frames', []);
if(GetValue(config, 'reverse', false))
{
animFrames.reverse();
}
/**
* Extract all the frame data into the frames array
*
@ -123,7 +115,7 @@ var Animation = new Class({
*/
this.frames = this.getFrames(
manager.textureManager,
animFrames,
GetValue(config, 'frames', []),
GetValue(config, 'defaultTextureKey', null)
);