12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- System.register(["__unresolved_0", "cc", "__unresolved_1"], function (_export, _context) {
- "use strict";
- var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, Component, PoolManager, _dec, _class, _crd, ccclass, property, BulletBase;
- function _reportPossibleCrUseOfGunBase(extras) {
- _reporterNs.report("GunBase", "./GunBase", _context.meta, extras);
- }
- function _reportPossibleCrUseOfPoolManager(extras) {
- _reporterNs.report("PoolManager", "../../core/manager/PoolManager", _context.meta, extras);
- }
- return {
- setters: [function (_unresolved_) {
- _reporterNs = _unresolved_;
- }, function (_cc) {
- _cclegacy = _cc.cclegacy;
- __checkObsolete__ = _cc.__checkObsolete__;
- __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
- _decorator = _cc._decorator;
- Component = _cc.Component;
- }, function (_unresolved_2) {
- PoolManager = _unresolved_2.PoolManager;
- }],
- execute: function () {
- _crd = true;
- _cclegacy._RF.push({}, "051dfv7+IlCjZaFXRdIPsX0", "BulletBase", undefined);
- __checkObsolete__(['_decorator', 'Component']);
- ({
- ccclass,
- property
- } = _decorator);
- _export("BulletBase", BulletBase = (_dec = ccclass('BulletBase'), _dec(_class = class BulletBase extends Component {
- constructor() {
- super();
- this.isDead = false;
- //枪的数据 在gunBase中
- this.gunBase = null;
- //子弹自动回收的时间5s
- this.recycleTime = 3;
- this.isDead = false;
- }
- start() {
- this.scheduleOnce(this.autoRecycle.bind(this), this.recycleTime);
- }
- autoRecycle() {
- if (!this.isDead) {
- this.isDead = true;
- (_crd && PoolManager === void 0 ? (_reportPossibleCrUseOfPoolManager({
- error: Error()
- }), PoolManager) : PoolManager).putNode(this.node);
- }
- }
- }) || _class));
- _cclegacy._RF.pop();
- _crd = false;
- }
- };
- });
- //# sourceMappingURL=eb14a88eb366d9e2d1496bdee08c0ed73b2c82b3.js.map
|