showCastingEndState() {
    let showDuration = 0.0;
    // console.log(this.sdkCard.getLogName(), "showCastingEndState", this._numCastingStatesToShow, this._showingCastingEndStateTimeoutId == null, !this._showingCastState);
    // update casting state
    this._cleanupCastingStartStateTimeout();
    this._numCastingStatesToShow = Math.max(0, this._numCastingStatesToShow - 1);

    if (this.canChangeState() && this._showingCastingEndStateTimeoutId == null && !this._showingCastState) {
      // get duration
      const animResource = this.getAnimResource();
      const animIdentifier = animResource && animResource.castEnd;
      const anim = cc.animationCache.getAnimation(animIdentifier);
      if (anim) {
        showDuration += anim.getDuration() * 0.5;
      }

      // add cast delay
      showDuration += CONFIG.GENERAL_CAST_END_DELAY;

      this._showingCastingEndStateTimeoutId = setTimeout(() => {
        this._showingCastingEndStateTimeoutId = null;
        this.whenResourcesReady(this.getCardResourceRequestId()).then((cardResourceRequestId) => {
          if (!this.getAreResourcesValid(cardResourceRequestId)) return; // card has changed
          // console.log(this.sdkCard.getLogName(), " > > showCastingEndState", this._showingCastingStartStateTimeoutId == null, this._showingCastingStartState || this._showingCastingState, !this._showingCastState);
          if (this.canChangeState() && this._showingCastingStartStateTimeoutId == null && !this.getIsMoving() && (this._showingCastingStartState || this._showingCastingState) && !this._showingCastState) {
            // clear all states
            this.showNoState();

            // compose sequence
            const sequence = [];

            const animAction = animIdentifier && UtilsEngine.getAnimationAction(animIdentifier);
            if (animAction != null) {
              sequence.push(animAction);
            }

            sequence.push(cc.callFunc(this.showNextState, this));
            this._stateActions.push(this.entitySprite.runAction(cc.sequence(sequence)));
          }
        });
      }, CONFIG.GENERAL_CAST_END_DELAY * 1000.0);
    }

    return showDuration;
  }
Shows entity end casting end state.
@returns {Number} duration of show