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

  var _cclegacy, _decorator, Component, resources, ImageAsset, Sprite, SpriteFrame, _dec, _class, _crd, ccclass, property, Load;

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

      _cclegacy._RF.push({}, "b3075eViUBAmbKoAiWWuqln", "load", undefined);

      ({
        ccclass,
        property
      } = _decorator);

      _export("Load", Load = (_dec = ccclass('Load'), _dec(_class = class Load extends Component {
        // [1]
        // dummy = '';
        // [2]
        // @property
        // serializableDummy = 0;
        start() {
          // [3]
          this.node.addComponent(Sprite);
          resources.load("res/pkqiu", ImageAsset, (err, res) => {
            if (res) {
              // 方式1
              let sp = this.node.getComponent(Sprite);
              sp.spriteFrame = SpriteFrame.createWithImage(res); // 方式2
              // const spriteFrame = new SpriteFrame();
              // const tex = new Texture2D();
              // tex.image = res;
              // spriteFrame.texture = tex;
              // sp.spriteFrame = spriteFrame;
            }
          }); // let newNode = new Node();
          // this.node.addChild(newNode);
          // console.log(newNode.layer);
        } // update (deltaTime: number) {
        //     // [4]
        // }


      }) || _class));
      /**
       * [1] Class member could be defined like this.
       * [2] Use `property` decorator if your want the member to be serializable.
       * [3] Your initialization goes here.
       * [4] Your update function goes here.
       *
       * Learn more about scripting: https://docs.cocos.com/creator/3.0/manual/en/scripting/
       * Learn more about CCClass: https://docs.cocos.com/creator/3.0/manual/en/scripting/ccclass.html
       * Learn more about life-cycle callbacks: https://docs.cocos.com/creator/3.0/manual/en/scripting/life-cycle-callbacks.html
       */


      _cclegacy._RF.pop();

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