Phaser API Documentation

  Version: 
toggle(key)

Description:

Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false.

When the value is first set, a setdata event is emitted.

Parameters:

name type description
key string | object

The key to toggle the value for.

Returns:
Description:

This DataManager object.

Since: 3.23.0
Source: src/data/DataManager.js (Line 321)