From 0cf5b20775f8927fd9170c35dcc5cef4ee3fa9ef Mon Sep 17 00:00:00 2001 From: Eemeli Kelokorpi Date: Thu, 22 May 2014 11:56:12 +0300 Subject: [PATCH] Added startScene attribute to System --- src/engine/loader.js | 6 +++++- src/engine/system.js | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/engine/loader.js b/src/engine/loader.js index 8ef055c6..2cb4496d 100644 --- a/src/engine/loader.js +++ b/src/engine/loader.js @@ -45,10 +45,14 @@ game.Loader = game.Class.extend({ @property {Array} assets **/ sounds: [], + /** + Is loader started. + @property {Boolean} started + **/ started: false, init: function(scene) { - this.scene = scene || SceneGame; + this.scene = scene || window[game.System.startScene] || game[game.System.startScene]; this.stage = game.system.stage; for (var i = 0; i < game.resources.length; i++) { diff --git a/src/engine/system.js b/src/engine/system.js index c589f197..dd5bd593 100644 --- a/src/engine/system.js +++ b/src/engine/system.js @@ -647,4 +647,11 @@ game.System.antialias = false; **/ game.System.resizeToFill = false; +/** + Default start scene. + @attribute {String} startScene + @default SceneGame +**/ +game.System.startScene = 'SceneGame'; + });