108a97f57e778627c9cd55ffd5cec9d0ad06b127.js 980 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. System.register(["cc"], function (_export, _context) {
  2. "use strict";
  3. var _cclegacy, Singleton, _crd;
  4. _export("Singleton", void 0);
  5. return {
  6. setters: [function (_cc) {
  7. _cclegacy = _cc.cclegacy;
  8. }],
  9. execute: function () {
  10. _crd = true;
  11. _cclegacy._RF.push({}, "35443DU2a9HQo4/Jh2U4R1R", "Singleton", undefined);
  12. /**
  13. * 单例基类
  14. */
  15. _export("Singleton", Singleton = class Singleton {
  16. constructor() {}
  17. /**获取单例实例
  18. * @returns 单例实例
  19. */
  20. static ins() {
  21. if (!this._ins) {
  22. ;
  23. this._ins = new this();
  24. }
  25. return this._ins;
  26. }
  27. /**
  28. * 销毁单例实例
  29. */
  30. static destroy() {
  31. ;
  32. this._ins = null;
  33. }
  34. });
  35. _cclegacy._RF.pop();
  36. _crd = false;
  37. }
  38. };
  39. });
  40. //# sourceMappingURL=108a97f57e778627c9cd55ffd5cec9d0ad06b127.js.map