UNPKG

phaser4-rex-plugins

Version:
15 lines (11 loc) 408 B
import Cover from './Cover.js'; const BuildGameObject = Phaser.GameObjects.BuildGameObject; export default function (config, addToScene) { if (config === undefined) { config = {}; } if (addToScene !== undefined) { config.add = addToScene; } var gameObject = new Cover(this.scene, config); BuildGameObject(this.scene, gameObject, config); return gameObject; }