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

  var _reporterNs, _cclegacy, Component, director, Node, Clock, _crd, CreatorContext;

  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }

  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

  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 _reportPossibleCrUseOfClock(extras) {
    _reporterNs.report("Clock", "./Clock", _context.meta, extras);
  }

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

      _cclegacy._RF.push({}, "a1ba96rk5dKxJ/igoUI4maV", "CreatorContext", undefined);

      _export("default", CreatorContext = /*#__PURE__*/function (_Component) {
        _inheritsLoose(CreatorContext, _Component);

        function CreatorContext() {
          var _this;

          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }

          _this = _Component.call.apply(_Component, [this].concat(args)) || this;

          _defineProperty(_assertThisInitialized(_this), "clock", new (_crd && Clock === void 0 ? (_reportPossibleCrUseOfClock({
            error: Error()
          }), Clock) : Clock)());

          return _this;
        }

        CreatorContext.GetInstance = function GetInstance() {
          if (CreatorContext.instance == null) {
            var gameObject = new Node();
            gameObject.name = "~Context";
            CreatorContext.instance = gameObject.addComponent(CreatorContext);
            director.getScene().addChild(gameObject);
          }

          return CreatorContext.instance;
        };

        CreatorContext.GetClock = function GetClock() {
          return CreatorContext.GetInstance().clock;
        } // LIFE-CYCLE CALLBACKS:
        ;

        var _proto = CreatorContext.prototype;

        // onLoad () {}
        _proto.start = function start() {};

        _proto.update = function update(dt) {
          this.clock.Update(dt);
        };

        return CreatorContext;
      }(Component));

      _defineProperty(CreatorContext, "instance", null);

      _cclegacy._RF.pop();

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