mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 20:53:39 +00:00
The SceneManager no longer renders a Scene unless it is visible AND either running or paused. This now skips Scenes that are in an init
state.
This commit is contained in:
parent
a993251dea
commit
9a6e6265e8
1 changed files with 19 additions and 1 deletions
|
@ -452,7 +452,7 @@ var SceneManager = new Class({
|
|||
{
|
||||
var sys = this.scenes[i].sys;
|
||||
|
||||
if (sys.settings.visible)
|
||||
if (sys.settings.visible && (sys.settings.status === CONST.RUNNING || sys.settings.status === CONST.PAUSED))
|
||||
{
|
||||
sys.render(renderer);
|
||||
}
|
||||
|
@ -1196,6 +1196,24 @@ var SceneManager = new Class({
|
|||
return this;
|
||||
},
|
||||
|
||||
dump: function ()
|
||||
{
|
||||
var out = [];
|
||||
var map = [ 'pending', 'init', 'start', 'loading', 'creating', 'running', 'paused', 'sleeping', 'shutdown', 'destroyed' ];
|
||||
|
||||
for (var i = 0; i < this.scenes.length; i++)
|
||||
{
|
||||
var sys = this.scenes[i].sys;
|
||||
|
||||
var key = (sys.settings.visible && (sys.settings.status === CONST.RUNNING || sys.settings.status === CONST.PAUSED)) ? '[*] ' : '[-] ';
|
||||
key += sys.settings.key + ' (' + map[sys.settings.status] + ')';
|
||||
|
||||
out.push(key);
|
||||
}
|
||||
|
||||
console.log(out.join('\n'));
|
||||
},
|
||||
|
||||
/**
|
||||
* [description]
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue