c4039da558f6bbe8a6756706a8897d55b771f332.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. System.register(["__unresolved_0", "cc", "__unresolved_1"], function (_export, _context) {
  2. "use strict";
  3. var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, VMParent, _dec, _class, _class2, _crd, ccclass, property, CCVMParentComp;
  4. function _reportPossibleCrUseOfecs(extras) {
  5. _reporterNs.report("ecs", "../../libs/ecs/ECS", _context.meta, extras);
  6. }
  7. function _reportPossibleCrUseOfVMParent(extras) {
  8. _reporterNs.report("VMParent", "../../libs/model-view/VMParent", _context.meta, extras);
  9. }
  10. return {
  11. setters: [function (_unresolved_) {
  12. _reporterNs = _unresolved_;
  13. }, function (_cc) {
  14. _cclegacy = _cc.cclegacy;
  15. __checkObsolete__ = _cc.__checkObsolete__;
  16. __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
  17. _decorator = _cc._decorator;
  18. }, function (_unresolved_2) {
  19. VMParent = _unresolved_2.default;
  20. }],
  21. execute: function () {
  22. _crd = true;
  23. _cclegacy._RF.push({}, "5908aTmM1lItpXgo7ROpQeQ", "CCVMParentComp", undefined);
  24. /*
  25. * @Author: dgflash
  26. * @Date: 2021-11-11 19:05:32
  27. * @LastEditors: dgflash
  28. * @LastEditTime: 2022-09-06 17:22:05
  29. */
  30. __checkObsolete__(['_decorator']);
  31. ({
  32. ccclass,
  33. property
  34. } = _decorator);
  35. /**
  36. * 支持 MVVM 功能的游戏显示对象组件
  37. *
  38. * 使用方法:
  39. * 1. 对象拥有 cc.Component 组件功能与 ecs.Comp 组件功能
  40. * 2. 对象自带全局事件监听、释放、发送全局消息功能
  41. * 3. 对象管理的所有节点摊平,直接通过节点名获取cc.Node对象(节点名不能有重名)
  42. * 4. 对象支持 VMParent 所有功能
  43. *
  44. * 应用场景
  45. * 1. 网络游戏,优先有数据对象,然后创建视图对象,当释放视图组件时,部分场景不希望释放数据对象
  46. *
  47. * @example
  48. @ccclass('LoadingViewComp')
  49. @ecs.register('LoadingView', false)
  50. export class LoadingViewComp extends CCVMParentComp {
  51. // VM 组件绑定数据
  52. data: any = {
  53. // 加载资源当前进度
  54. finished: 0,
  55. // 加载资源最大进度
  56. total: 0,
  57. // 加载资源进度比例值
  58. progress: "0",
  59. // 加载流程中提示文本
  60. prompt: ""
  61. };
  62. private progress: number = 0;
  63. reset(): void {
  64. }
  65. }
  66. */
  67. _export("CCVMParentComp", CCVMParentComp = (_dec = ccclass('CCVMParentComp'), _dec(_class = (_class2 = class CCVMParentComp extends (_crd && VMParent === void 0 ? (_reportPossibleCrUseOfVMParent({
  68. error: Error()
  69. }), VMParent) : VMParent) {
  70. constructor(...args) {
  71. super(...args);
  72. this.canRecycle = void 0;
  73. this.ent = void 0;
  74. }
  75. }, _class2.tid = -1, _class2.compName = void 0, _class2)) || _class));
  76. _cclegacy._RF.pop();
  77. _crd = false;
  78. }
  79. };
  80. });
  81. //# sourceMappingURL=c4039da558f6bbe8a6756706a8897d55b771f332.js.map