This commit is contained in:
2021-10-30 17:20:26 +03:00
parent 1a29c16bcd
commit cd65398fb0
18 changed files with 855 additions and 290 deletions
@@ -0,0 +1,27 @@
/** @module ActionCollection */
kit.PluginManager.register('ActionCollection', function(module, exports, require, global) {
var Collection = require('Collection');
/**
* @memberOf kit
*/
var ActionCollection = function (list = []) {
this.collection = new Collection(list);
};
ActionCollection.prototype.push = function (action) {
this.collection.push(action);
};
ActionCollection.prototype.run = function (count = -1) {
this.collection.map(function (action) {
action.run(count);
})
};
ActionCollection.prototype.stop = function () {
this.collection.map(function (action) {
action.stop();
})
};
return module.exports = ActionCollection;
});