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

  var _reporterNs, _cclegacy, _decorator, Component, _dec, _class, _temp, _crd, ccclass, property, OTWTroopRenderComponent;

  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

  function _reportPossibleCrUseOfIMap(extras) {
    _reporterNs.report("IMap", "../../shared/gameClient/games/OccupationTheWarModels", _context.meta, extras);
  }

  function _reportPossibleCrUseOfOTWTroopInfo(extras) {
    _reporterNs.report("OTWTroopInfo", "./OTWTroopInfo", _context.meta, extras);
  }

  return {
    setters: [function (_unresolved_) {
      _reporterNs = _unresolved_;
    }, function (_cc) {
      _cclegacy = _cc.cclegacy;
      _decorator = _cc._decorator;
      Component = _cc.Component;
    }],
    execute: function () {
      _crd = true;

      _cclegacy._RF.push({}, "640e0r1RUVB/oClHMHFMUTo", "OTWTroopRenderComponent", undefined);

      ({
        ccclass,
        property
      } = _decorator);

      _export("OTWTroopRenderComponent", OTWTroopRenderComponent = (_dec = ccclass('OTWTroopRenderComponent'), _dec(_class = (_temp = class OTWTroopRenderComponent extends Component {
        constructor() {
          super(...arguments);

          _defineProperty(this, "troopInfo", null);

          _defineProperty(this, "getMap", null);
        }

        onDestroy() {
          this.troopInfo = null;
          this.getMap = null;
        }

        update() {
          var _this$getMap;

          if (!this.troopInfo) return;
          var troop = (_this$getMap = this.getMap) === null || _this$getMap === void 0 ? void 0 : _this$getMap.call(this).allAttackingTroop[this.troopInfo.troopIndex];
          if (!troop) return; //先简单设置一下,表示逻辑数据和渲染数据分离,之后再做平滑和动画队列等

          this.node.setPosition(troop.x, 0, troop.z);
        }

      }, _temp)) || _class));

      _cclegacy._RF.pop();

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