System.register(["__unresolved_0", "cc", "__unresolved_1"], function (_export, _context) {
  "use strict";

  var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, Component, Input, Node, gameMangager, _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2, _descriptor3, _crd, ccclass, property, uiMain;

  function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }

  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }

  function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }

  function _reportPossibleCrUseOfgameMangager(extras) {
    _reporterNs.report("gameMangager", "../framework/gameMangager", _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;
      Input = _cc.Input;
      Node = _cc.Node;
    }, function (_unresolved_2) {
      gameMangager = _unresolved_2.gameMangager;
    }],
    execute: function () {
      _crd = true;

      _cclegacy._RF.push({}, "ea279qn9stK37GU0swjidkx", "uiMain", undefined);

      __checkObsolete__(['_decorator', 'Component', 'EventTouch', 'Input', 'Node']);

      ({
        ccclass,
        property
      } = _decorator);

      _export("uiMain", uiMain = (_dec = ccclass('uiMain'), _dec2 = property(Node), _dec3 = property(_crd && gameMangager === void 0 ? (_reportPossibleCrUseOfgameMangager({
        error: Error()
      }), gameMangager) : gameMangager), _dec(_class = (_class2 = class uiMain extends Component {
        constructor(...args) {
          super(...args);

          _initializerDefineProperty(this, "planeSpeed", _descriptor, this);

          _initializerDefineProperty(this, "playerPlane", _descriptor2, this);

          _initializerDefineProperty(this, "gamgeManager", _descriptor3, this);
        }

        start() {
          // input.on(Input.EventType.TOUCH_START, this._touchStart, this);
          this.node.on(Input.EventType.TOUCH_MOVE, this._touchMove, this); // 

          this.node.on(Input.EventType.TOUCH_START, this._touchStart, this);
          this.node.on(Input.EventType.TOUCH_END, this._touchEnd, this);
        } // update(deltaTime: number) {  
        // }


        _touchMove(event) {
          const delta = event.getDelta();
          let pos = this.playerPlane.position; // x 上下, z 左右 
          // this.node.setPosition(pos.x - 0.01 * this.speed * delta.x, pos.y, pos.z - 0.01 * this.speed * delta.y)

          this.playerPlane.setPosition(pos.x + 0.01 * this.planeSpeed * delta.y, pos.y, pos.z + 0.01 * this.planeSpeed * delta.x);
        }

        _touchStart(event) {
          console.log('开始发射');
          this.gamgeManager.isShooting(true);
        }

        _touchEnd(event) {
          console.log('结束发射');
          this.gamgeManager.isShooting(false);
        }

      }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "planeSpeed", [property], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function () {
          return 1;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "playerPlane", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function () {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "gamgeManager", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function () {
          return null;
        }
      })), _class2)) || _class));

      _cclegacy._RF.pop();

      _crd = false;
    }
  };
});
//# sourceMappingURL=32eca9bac48adb566399747211a4afd746b61921.js.map