Phaser API Documentation

  Version: 
sleep([data])

Description:

Send this Scene to sleep.

A sleeping Scene doesn't run its update step or render anything, but it also isn't shut down or has any of its systems or children removed, meaning it can be re-activated at any point and will carry on from where it left off. It also keeps everything in memory and events and callbacks from other Scenes may still invoke changes within it, so be careful what is left active.

Parameters:

name type arguments description
data object <optional>

A data object that will be passed in the 'sleep' event.

Returns:
Description:

This Systems object.

Since: 3.0.0
Source: src/scene/Systems.js (Line 473)