mirror of
https://bitbucket.org/bellord13/kit.git
synced 2026-11-13 19:06:11 +03:00
fix
This commit is contained in:
@@ -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;
|
||||
});
|
||||
Reference in New Issue
Block a user