"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.StarFactory = exports.Star = void 0;
class StarFactory {
  constructor(scene) {
    this.scene = scene;
  }
  create(group, x, y) {
    const star = new Star(this.scene, x, y);
    group.add(star);
    return star;
  }
}
exports.StarFactory = StarFactory;
class Star extends Phaser.Physics.Arcade.Sprite {
  constructor(scene, x, y) {
    super(scene, x, y, "star");
    this.scene = scene;
    scene.add.existing(this);
    scene.physics.add.existing(this);
    this.init();
    this.scene.events.on(Phaser.Scenes.Events.UPDATE, this.update, this);
  }
  init() {
    this.setOrigin(0.5, 0.5).setCollideWorldBounds(true).setDisplaySize(64, 64).setDepth(2);
  }
  update() {}
}
exports.Star = Star;