Phaser API Documentation

  Version: 
inc(key, [data])

Description:

Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0.

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

Parameters:

name type arguments description
key string | object

The key to increase the value for.

data * <optional>

The value to increase for the given key.

Returns:
Description:

This DataManager object.

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