From e3ceb982aaf36ca0677012e0ac03bb0078b1d303 Mon Sep 17 00:00:00 2001 From: 2youyouo2 <501251991@qq.com> Date: Wed, 19 Oct 2016 14:45:14 +0800 Subject: [PATCH] fixed animation callback --- cocos2d/animation/playable.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cocos2d/animation/playable.js b/cocos2d/animation/playable.js index 4c959a20bc..04b1be2f7a 100644 --- a/cocos2d/animation/playable.js +++ b/cocos2d/animation/playable.js @@ -108,8 +108,10 @@ prototype.stop = function () { * @method pause */ prototype.pause = function () { - this._isPaused = true; - this.onPause(); + if (this._isPlaying) { + this._isPaused = true; + this.onPause(); + } }; /** @@ -118,8 +120,10 @@ prototype.pause = function () { * @method resume */ prototype.resume = function () { - this._isPaused = false; - this.onResume(); + if (this._isPlaying) { + this._isPaused = false; + this.onResume(); + } }; /**