showCastState() {
    let showDuration = 0.0;
    // console.log(this.sdkCard.getLogName(), "showCastState", this._numCastingStatesToShow);
    // update casting state
    this._cleanupCastingStateTimeouts();

    if (this.canChangeState()) {
      // get duration
      const animResource = this.getAnimResource();
      let animIdentifier;
      if (animResource != null) {
        // use cast animation when present, fallback to attack animation
        animIdentifier = animResource.cast || animResource.attack;
      }
      const anim = cc.animationCache.getAnimation(animIdentifier);
      if (anim) {
        showDuration += anim.getDuration() * 0.25;
      }

      this.whenResourcesReady(this.getCardResourceRequestId()).then((cardResourceRequestId) => {
        if (!this.getAreResourcesValid(cardResourceRequestId)) return; // card has changed
        if (this.canChangeState()) {
          // console.log(this.sdkCard.getLogName(), " > > showCastState");
          // clear all states
          this.showNoState();
          this.removeReadinessVisualTag();
          this._showingCastState = true;

          // compose sequence
          const sequence = [];

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

          sequence.push(cc.callFunc(() => {
            this.showNextState();
          }));
          this._stateActions.push(this.entitySprite.runAction(cc.sequence(sequence)));
        }
      });
    }

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