werewolf-core
Version:
Are you a WEREWOLF?
28 lines (27 loc) • 682 B
JavaScript
;
var EventBase = (function () {
function EventBase() {
this.queue = [];
}
EventBase.prototype.addEvent = function (e) {
this.queue.push(e);
};
EventBase.prototype.iterateEvent = function () {
return this.queue.shift();
};
EventBase.prototype.getAdder = function () {
return new EventAdder(this);
};
return EventBase;
}());
exports.EventBase = EventBase;
var EventAdder = (function () {
function EventAdder(base) {
this.base = base;
}
EventAdder.prototype.addEvent = function (e) {
this.base.addEvent(e);
};
return EventAdder;
}());
exports.EventAdder = EventAdder;