mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 13:13:43 +00:00
Pass game instance as boot callback arguments.
It may be useful to run some operations while the game is booting. However, if a living instance of the game is necessary during this process, only way possible is using a global variable at the moment. This commit aims to amend that so whenever needed the game instance reference is passed down and can be used inside the {pre,post}Boot callbacks.
This commit is contained in:
parent
6e82760c99
commit
20e3825e1f
1 changed files with 2 additions and 2 deletions
|
@ -265,7 +265,7 @@ var Game = new Class({
|
|||
{
|
||||
this.isBooted = true;
|
||||
|
||||
this.config.preBoot();
|
||||
this.config.preBoot(this);
|
||||
|
||||
CreateRenderer(this);
|
||||
|
||||
|
@ -292,7 +292,7 @@ var Game = new Class({
|
|||
{
|
||||
this.isRunning = true;
|
||||
|
||||
this.config.postBoot();
|
||||
this.config.postBoot(this);
|
||||
|
||||
if (this.renderer)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue