How to call a function when a delayed tween starts tweening?

Tween can have onStart callback, but this callback is fired immediately after the tween is started and it ignores tween’s delay. Is there a way how to call a callback when the delayed tweening is really started?

Now, I’m using this.time.delayedCall() with the same delay as the tween has, but this seems to me as not the best solution.

There doesn’t seem to be an onStart that is called after a delay. However, you could always extend the Phaser.Scene class and add your own tween method. In the tween method you could do something like the following:

/**
 * @param {Phaser.Math.Easing} ease 
 * @param {Phaser.GameObjects.GameObject} object 
 * @return {Phaser.Tweens.Tween}
 */
addTween(object, duration, parameters, ease = null)
{
    parameters.targets = object;
    parameters.ease = ease;
    parameters.duration = duration;

    if(parameters.onStart && parameters.delay)
    {
        let startFunc = parameters.onStart;
        delete parameters.onStart;
        this.time.delayedCall(parameters.delay, startFunc);
    }

    return this.tweens.add(parameters);
}