mirror of
https://github.com/photonstorm/phaser
synced 2024-11-21 20:23:19 +00:00
You can now pass a data argument to ScenePlugin.switch
This commit is contained in:
parent
4003aa7f3e
commit
53c491fb84
1 changed files with 3 additions and 2 deletions
|
@ -632,14 +632,15 @@ var ScenePlugin = new Class({
|
|||
* @genericUse {(T|string)} - [key]
|
||||
*
|
||||
* @param {(string|Phaser.Scene)} key - The Scene to start.
|
||||
* @param {any} [data] - Optional data object to pass to either the Scene `wake` or `start` method.
|
||||
*
|
||||
* @return {this} This Scene Plugin instance.
|
||||
*/
|
||||
switch: function (key)
|
||||
switch: function (key, data)
|
||||
{
|
||||
if (key !== this.key)
|
||||
{
|
||||
this.manager.queueOp('switch', this.key, key);
|
||||
this.manager.queueOp('switch', this.key, key, data);
|
||||
}
|
||||
|
||||
return this;
|
||||
|
|
Loading…
Reference in a new issue