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

  var _reporterNs, _cclegacy, _decorator, Component, resources, Texture2D, Sprite, SpriteFrame, RoleSprite, _dec, _class, _crd, ccclass, property, mainScene;

  function _reportPossibleCrUseOfRoleSprite(extras) {
    _reporterNs.report("RoleSprite", "./RoleSprite", _context.meta, extras);
  }

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

      _cclegacy._RF.push({}, "c39c2mqvaRDXa4Sl/8iVUFR", "mainScene", undefined);

      ({
        ccclass,
        property
      } = _decorator);

      _export("mainScene", mainScene = (_dec = ccclass('mainScene'), _dec(_class = class mainScene extends Component {
        start() {
          let thisSelf = this;
          let resList = "map/test1/texture";
          resources.load(resList, Texture2D, function (error, asset) {
            if (!error) {
              thisSelf.updateSceneData(asset);
            } else console.log(error.message);
          });
          let role = new (_crd && RoleSprite === void 0 ? (_reportPossibleCrUseOfRoleSprite({
            error: Error()
          }), RoleSprite) : RoleSprite)();
          role.onLoad(this.node.getChildByName("roleNode"));
        }

        updateSceneData(background) {
          let bk = this.node.getChildByName("background");
          let sprite = bk.getComponent(Sprite);
          let spriteFrame = new SpriteFrame();
          spriteFrame.texture = background;
          sprite.spriteFrame = spriteFrame;
        }

      }) || _class));

      _cclegacy._RF.pop();

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