mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 00:22:43 +08:00
fixed animation callback
This commit is contained in:
@@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user