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

  var _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, Collider, Component, _dec, _class, _crd, ccclass, property, CoinScript;

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

      _cclegacy._RF.push({}, "c8477sirpBC+qrVrmibIHsE", "CoinScript", undefined);

      __checkObsolete__(['_decorator', 'Collider', 'Component', 'ICollisionEvent', 'Node', 'Vec3']);

      ({
        ccclass,
        property
      } = _decorator);

      _export("CoinScript", CoinScript = (_dec = ccclass('CoinScript'), _dec(_class = class CoinScript extends Component {
        start() {
          var collider = this.node.getComponent(Collider);
          collider.on("onCollisionStay", this.onCollision, this);
          collider.on("onCollisionEnter", this.onCollisionEnter, this);
          collider.on("onCollisionExit", this.onCollisionExit, this);
        }

        onCollision(event) {
          console.log(event.type, event + " collision stay");
        }

        onCollisionEnter(event) {
          console.log(event.type, event + " collision Enter");
          this.node.destroy();
        }

        onCollisionExit(event) {
          console.log(event.type, event + " collision Exit");
        }

        update(deltaTime) {
          /* const currentPosition = this.node.position;
           const moveAmount = new Vec3(0,0,0.1);
           Vec3.add(currentPosition,currentPosition,moveAmount);
           this.node.setPosition(currentPosition);
           */
        }

      }) || _class));

      _cclegacy._RF.pop();

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