mirror of
https://github.com/photonstorm/phaser
synced 2024-12-26 04:53:38 +00:00
665b295c3b
Also updated the physicsManager to make it a lot more cleaner and easy to adjust in future
25 lines
493 B
JavaScript
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;
|