phaser/v3/src/scene/global/components/CreateSceneFromObject.js
Richard Davey 665b295c3b Restructured the Scene folder and moved the plugins and components around
Also updated the physicsManager to make it a lot more cleaner and easy to adjust in future
2017-08-18 01:42:14 +01:00

25 lines
493 B
JavaScript

var Scene = require('../../local/Scene');
var CreateSceneFromObject = function (key, sceneConfig)
{
var newScene = new Scene(sceneConfig);
var configKey = newScene.sys.settings.key;
if (configKey !== '')
{
key = configKey;
}
else
{
newScene.sys.settings.key = key;
}
newScene.sys.init(this.game);
this.createSceneDisplay(newScene);
return this.setupCallbacks(newScene, sceneConfig);
};
module.exports = CreateSceneFromObject;