Phaser API Documentation

  Version: 
addCounter(config)

Description:

Create a Number Tween and add it to the active Tween list.

A Number Tween is a special kind of tween that doesn't have a target. Instead, it allows you to tween between 2 numeric values. The default values are 0 and 1, but you can change them via the from and to properties.

You can get the current tweened value via the Tween.getValue() method.

Playback will start immediately unless the tween has been configured to be paused.

Please note that a Tween will not manipulate any target property that begins with an underscore.

Parameters:

name type description
config Phaser.Types.Tweens.NumberTweenBuilderConfig

The configuration object for the Number Tween.

Returns:
Description:

The created Number Tween.

Since: 3.0.0