empty() {
    const currentLayer = this._currentLayer;

    return new Promise((resolve, reject) => {
      // stop current layer
      if (currentLayer != null) {
        currentLayer.stopActionByTag(CONFIG.FADE_TAG);
        currentLayer.onSetupTransitionOut();

        // clear current layer
        this._currentLayer = null;

        // crossfade current layer
        const transitionDuration = CONFIG.VIEW_TRANSITION_DURATION;
        currentLayer.fadeTo(transitionDuration, 0.0);

        // delay for transition duration and then resolve
        this.runAction(cc.sequence(
          cc.delayTime(transitionDuration),
          cc.callFunc(() => {
            currentLayer.onTransitionOut();
            currentLayer.destroy();
            resolve();
          }),
        ));
      } else {
        // no current layer
        resolve();
      }
    });
  }
Convenience method for emptying the layer. Returns a promise that resolves when the layer content has been destroyed.
@returns {Promise}