From e49b82bc586ae76ce59c4265f3f8180fc963a35c Mon Sep 17 00:00:00 2001 From: pandamicro Date: Mon, 12 Feb 2018 18:09:32 +0800 Subject: [PATCH] Remove dependency of cc._Class from ActionManager --- cocos2d/actions/CCActionManager.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/cocos2d/actions/CCActionManager.js b/cocos2d/actions/CCActionManager.js index 0d92bb2558..09a20992f8 100644 --- a/cocos2d/actions/CCActionManager.js +++ b/cocos2d/actions/CCActionManager.js @@ -57,8 +57,13 @@ var HashElement = function () { * @class ActionManager * @example {@link utils/api/engine/docs/cocos2d/core/CCActionManager/ActionManager.js} */ -cc.ActionManager = cc._Class.extend(/** @lends cc.ActionManager# */{ - +cc.ActionManager = function () { + this._hashTargets = {}; + this._arrayTargets = []; + this._currentTarget = null; +}; +cc.ActionManager.prototype = { + constructor: cc.ActionManager, _elementPool: [], _searchElementByTarget:function (arr, target) { @@ -69,12 +74,6 @@ cc.ActionManager = cc._Class.extend(/** @lends cc.ActionManager# */{ return null; }, - ctor:function () { - this._hashTargets = {}; - this._arrayTargets = []; - this._currentTarget = null; - }, - _getElement: function (target, paused) { var element = this._elementPool.pop(); if (!element) { @@ -436,7 +435,7 @@ cc.ActionManager = cc._Class.extend(/** @lends cc.ActionManager# */{ } } } -}); +}; if (CC_TEST) { cc.ActionManager.prototype.isTargetPaused_TEST = function (target) {