f7970e38-1486-4d03-992e-6ca18d2688e3.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. "use strict";
  2. cc._RF.push(module, 'f797044FIZNA5kubKGNJojj', 'MacroCommand');
  3. // lightMVC/core/command/MacroCommand.ts
  4. "use strict";
  5. var __extends = (this && this.__extends) || (function () {
  6. var extendStatics = function (d, b) {
  7. extendStatics = Object.setPrototypeOf ||
  8. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  9. function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
  10. return extendStatics(d, b);
  11. };
  12. return function (d, b) {
  13. extendStatics(d, b);
  14. function __() { this.constructor = d; }
  15. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  16. };
  17. })();
  18. Object.defineProperty(exports, "__esModule", { value: true });
  19. var BaseCommand_1 = require("../base/BaseCommand");
  20. /**
  21. * 组合类型命令基类
  22. */
  23. var MacroCommand = /** @class */ (function (_super) {
  24. __extends(MacroCommand, _super);
  25. function MacroCommand() {
  26. var _this = _super !== null && _super.apply(this, arguments) || this;
  27. /** 组合命令列表 */
  28. _this._commandList = [];
  29. return _this;
  30. }
  31. /**
  32. * 向组合宏中添加子命令
  33. * @param {{new (): SimpleCommand}} command 子命令
  34. * @param {Object} body 命令参数
  35. */
  36. MacroCommand.prototype.addSubCommand = function (command, body) {
  37. this._commandList.push({ cmd: command, body: body });
  38. };
  39. return MacroCommand;
  40. }(BaseCommand_1.default));
  41. exports.default = MacroCommand;
  42. cc._RF.pop();