cccf48fd4679a4c17a7bbe6542bf6e84aa1894a4.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. System.register(["__unresolved_0", "cc", "__unresolved_1"], function (_export, _context) {
  2. "use strict";
  3. var _reporterNs, _cclegacy, BranchNode, Priority, _crd;
  4. function _reportPossibleCrUseOfBranchNode(extras) {
  5. _reporterNs.report("BranchNode", "./BranchNode", _context.meta, extras);
  6. }
  7. _export("Priority", void 0);
  8. return {
  9. setters: [function (_unresolved_) {
  10. _reporterNs = _unresolved_;
  11. }, function (_cc) {
  12. _cclegacy = _cc.cclegacy;
  13. }, function (_unresolved_2) {
  14. BranchNode = _unresolved_2.BranchNode;
  15. }],
  16. execute: function () {
  17. _crd = true;
  18. _cclegacy._RF.push({}, "f7555DSpj9LbYpRDi8/UKdN", "Priority", undefined);
  19. /*
  20. * @Author: dgflash
  21. * @Date: 2022-06-21 12:05:14
  22. * @LastEditors: dgflash
  23. * @LastEditTime: 2022-07-20 14:08:10
  24. */
  25. /** 优先 */
  26. _export("Priority", Priority = class Priority extends (_crd && BranchNode === void 0 ? (_reportPossibleCrUseOfBranchNode({
  27. error: Error()
  28. }), BranchNode) : BranchNode) {
  29. success() {
  30. super.success();
  31. this._control.success();
  32. }
  33. fail() {
  34. super.fail();
  35. this._actualTask += 1;
  36. if (this._actualTask < this.children.length) {
  37. this._run(this._blackboard);
  38. } else {
  39. this._control.fail();
  40. }
  41. }
  42. });
  43. _cclegacy._RF.pop();
  44. _crd = false;
  45. }
  46. };
  47. });
  48. //# sourceMappingURL=cccf48fd4679a4c17a7bbe6542bf6e84aa1894a4.js.map