Remove dependency of cc._Class from ActionManager

This commit is contained in:
pandamicro
2018-02-12 18:09:32 +08:00
parent b68d48730d
commit e49b82bc58
+8 -9
View File
@@ -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) {