stopShowingTitles(duration) {
    return new Promise((resolve) => {
      if (duration == null) { duration = 0.0; }
      const isAnimating = duration > 0.0;

      if (this._titlesAction != null) {
        this.stopAction(this._titlesAction);
        this._titlesAction = null;
      }

      // title
      if (this._titleLabel != null) {
        this._titleLabel.fadeToInvisible(duration);
      }

      // subtitle
      if (this._subtitleLabel != null) {
        this._subtitleLabel.fadeToInvisible(duration);
      }

      if (isAnimating) {
        this._titlesAction = cc.sequence(
          cc.delayTime(duration),
          cc.callFunc(() => {
            this._titlesAction = null;
            resolve();
          }),
        );
        this.runAction(this._titlesAction);
      } else {
        // immediate resolve when not animating
        resolve();
      }
    })
      .catch((error) => { EventBus.getInstance().trigger(EVENTS.error, error); });
  }
Hides any currently showing titles.
@param {Number} [duration=0.0]
@returns {Promise}