Skip to content

Commit

Permalink
Added startScene attribute to System
Browse files Browse the repository at this point in the history
  • Loading branch information
Eemeli Kelokorpi committed May 22, 2014
1 parent 827e41c commit 0cf5b20
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/engine/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down
7 changes: 7 additions & 0 deletions src/engine/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -647,4 +647,11 @@ game.System.antialias = false;
**/
game.System.resizeToFill = false;

/**
Default start scene.
@attribute {String} startScene
@default SceneGame
**/
game.System.startScene = 'SceneGame';

});

0 comments on commit 0cf5b20

Please sign in to comment.