phaser4-rex-plugins
Version:
16 lines (14 loc) • 392 B
JavaScript
var CreateBackground = function (scene, items, callback, scope) {
var background;
if (callback) {
items.scene = scene;
if (scope) {
background = callback.call(scope, items);
} else {
background = callback(items);
}
items.scene = undefined;
}
return background;
}
export default CreateBackground;