Phaser API Documentation

  Version: 
switch(from, to, [data])

Description:

Sleeps one one Scene and starts the other.

Parameters:

name type arguments description
from string | Phaser.Scene

The Scene to sleep.

to string | Phaser.Scene

The Scene to start.

data object <optional>

Optional data object to pass to Scene.Settings and Scene.init, and Scene.create. It is only passed when the scene starts for the first time.

Returns:
Description:

This Scene Manager instance.

Since: 3.0.0