UNPKG

phaser4-rex-plugins

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