Phaser API Documentation

  Version: 
add(config)

Description:

Adds one or more events to this Timeline.

You can pass in a single configuration object, or an array of them:

const timeline = this.add.timeline({
    at: 1000,
    run: () => {
        this.add.sprite(400, 300, 'logo');
    }
});

Parameters:

name type description
config Phaser.Types.Time.TimelineEventConfig | Array.<Phaser.Types.Time.TimelineEventConfig>

The configuration object for this Timeline Event, or an array of them.

Returns:
Description:

This Timeline instance.

Since: 3.60.0
Source: src/time/Timeline.js (Line 451)