Ejemplo n.º 1
0
    public void ApplyShowHitIcon(AffectEffect affect, int onDamage, Strength onWeak, bool onMiss, bool onCrithical, bool isDrain, bool isCounter, bool isReflection, ExtraEffectType extraEffectType = ExtraEffectType.Non, AffectEffectProperty affectEffectProperty = null)
    {
        this.ApplyHitIconPlayAnimation(onWeak);
        bool flag = false;

        HitIcon.Data data = (!flag) ? this.standard : this.gimmick;
        this.standard.gameObject.SetActive(!flag);
        this.gimmick.gameObject.SetActive(flag);
        base.transform.localScale = Vector3.one;
        data.numMesh.text         = string.Empty;
        data.topMesh.text         = string.Empty;
        data.middleMesh.text      = string.Empty;
        data.bottomMesh.text      = string.Empty;
        this.upSprite.gameObject.SetActive(false);
        this.downSprite.gameObject.SetActive(false);
        if (onMiss)
        {
            this.ShowMiss(data);
        }
        else
        {
            switch (affect)
            {
            case AffectEffect.Damage:
            case AffectEffect.ReferenceTargetHpRate:
            case AffectEffect.HpBorderlineDamage:
            case AffectEffect.HpBorderlineSpDamage:
            case AffectEffect.DefenseThroughDamage:
            case AffectEffect.SpDefenseThroughDamage:
            case AffectEffect.RefHpRateNonAttribute:
                this.ShowDamage(data, onDamage, onWeak, onCrithical, isCounter, isReflection, extraEffectType);
                return;

            case AffectEffect.AttackUp:
                this.ShowAttackUp(data);
                return;

            case AffectEffect.AttackDown:
                this.ShowAttackDown(data);
                return;

            case AffectEffect.DefenceUp:
                this.ShowDefenceUp(data);
                return;

            case AffectEffect.DefenceDown:
                this.ShowDefenceDown(data);
                return;

            case AffectEffect.SpAttackUp:
                this.ShowSpAttackUp(data);
                return;

            case AffectEffect.SpAttackDown:
                this.ShowSpAttackDown(data);
                return;

            case AffectEffect.SpDefenceUp:
                this.ShowSpDefenceUp(data);
                return;

            case AffectEffect.SpDefenceDown:
                this.ShowSpDefenceDown(data);
                return;

            case AffectEffect.SpeedUp:
                this.ShowSpeedUp(data);
                return;

            case AffectEffect.SpeedDown:
                this.ShowSpeedDown(data);
                return;

            case AffectEffect.CorrectionUpReset:
                this.ShowCorrectionUpReset(data);
                return;

            case AffectEffect.CorrectionDownReset:
                this.ShowCorrectionDownReset(data);
                return;

            case AffectEffect.HpRevival:
                this.ShowHpRevival(data, onDamage, isDrain);
                return;

            case AffectEffect.Counter:
                this.ShowCounter(data, onDamage);
                return;

            case AffectEffect.Reflection:
                this.ShowReflection(data, onDamage);
                return;

            case AffectEffect.Protect:
                this.ShowProtect(data);
                return;

            case AffectEffect.PowerCharge:
                this.ShowPowerCharge(data);
                return;

            case AffectEffect.Destruct:
                this.ShowDestruct(data);
                return;

            case AffectEffect.Paralysis:
                this.ShowParalysis(data);
                return;

            case AffectEffect.Poison:
                this.ShowPoison(data, onDamage);
                return;

            case AffectEffect.Sleep:
                this.ShowSleep(data);
                return;

            case AffectEffect.SkillLock:
                this.ShowSkillLock(data);
                return;

            case AffectEffect.HitRateUp:
                this.ShowHitRateUp(data);
                return;

            case AffectEffect.HitRateDown:
                this.ShowHitRateDown(data);
                return;

            case AffectEffect.InstantDeath:
                this.ShowInstantDeath(data);
                return;

            case AffectEffect.Confusion:
                this.ShowConfusion(data);
                return;

            case AffectEffect.Stun:
                this.ShowStun(data);
                return;

            case AffectEffect.SufferStatusClear:
                this.ShowSufferStatusClear(data);
                return;

            case AffectEffect.SatisfactionRateUp:
                this.ShowSatisfactionRateUp(data);
                return;

            case AffectEffect.SatisfactionRateDown:
                this.ShowSatisfactionRateDown(data);
                return;

            case AffectEffect.ApRevival:
                this.ShowApRevival(data);
                return;

            case AffectEffect.ApUp:
                this.ShowApUp(data);
                return;

            case AffectEffect.ApDown:
                this.ShowApDown(data);
                return;

            case AffectEffect.ApConsumptionUp:
                this.ShowApConsumptionUp(data);
                return;

            case AffectEffect.ApConsumptionDown:
                this.ShowApConsumptionDown(data);
                return;

            case AffectEffect.TurnBarrier:
                this.ShowTurnBarrier(data);
                return;

            case AffectEffect.CountBarrier:
                this.ShowCountBarrier(data);
                return;

            case AffectEffect.Invalid:
                this.ShowInvalid(data);
                return;

            case AffectEffect.Recommand:
                this.ShowRecommand(data);
                return;

            case AffectEffect.DamageRateUp:
                this.ShowDamageRateUp(data);
                return;

            case AffectEffect.DamageRateDown:
                this.ShowDamageRateDown(data);
                return;

            case AffectEffect.Regenerate:
                this.ShowRegenerate(data, onDamage);
                return;

            case AffectEffect.TurnEvasion:
                this.ShowTurnEvasion(data);
                return;

            case AffectEffect.CountEvasion:
                this.ShowCountEvasion(data);
                return;

            case AffectEffect.Escape:
                this.ShowEscape(data);
                return;

            case AffectEffect.ChangeToleranceUp:
                this.ShowAttributeTolerance(data, affectEffectProperty, true);
                return;

            case AffectEffect.ChangeToleranceDown:
                this.ShowAttributeTolerance(data, affectEffectProperty, false);
                return;

            case AffectEffect.ClearTolerance:
                this.ShowClearTolerance(data);
                return;
            }
            NGUITools.SetActiveSelf(base.gameObject, false);
        }
    }
Ejemplo n.º 2
0
 private void ShowDamage(HitIcon.Data data, int value, Strength strength, bool isCritical, bool isCounter, bool isReflection, ExtraEffectType extraEffectType)
 {
     if (isCounter)
     {
         data.bottomMesh.text = this.GetString("HitIconCounter");
         data.numMesh.text    = value.ToString();
         this.ChangeFontTexture(this.standardEffectFontTexture.yellow, new TextMeshPro[]
         {
             data.numMesh,
             data.bottomMesh
         });
     }
     if (isReflection)
     {
         data.bottomMesh.text = this.GetString("HitIconReflection");
         data.numMesh.text    = value.ToString();
         this.ChangeFontTexture(this.standardEffectFontTexture.yellow, new TextMeshPro[]
         {
             data.numMesh,
             data.bottomMesh
         });
     }
     else
     {
         if (isCritical)
         {
             data.bottomMesh.text = this.GetString("HitIconCritical");
             this.ChangeFontTexture(this.standardEffectFontTexture.yellow, new TextMeshPro[]
             {
                 data.bottomMesh
             });
         }
         data.numMesh.text = value.ToString();
         Texture resistanceFontTextureForNumber = this.GetResistanceFontTextureForNumber(strength);
         this.ChangeFontTexture(resistanceFontTextureForNumber, new TextMeshPro[]
         {
             data.numMesh
         });
         data.topMesh.text = this.GetWeakName(strength);
         Texture resistanceFontTextureForTop = this.GetResistanceFontTextureForTop(strength);
         this.ChangeFontTexture(resistanceFontTextureForTop, new TextMeshPro[]
         {
             data.topMesh
         });
     }
 }
Ejemplo n.º 3
0
 public void AddHitIcon(CharacterStateControl target, AffectEffect affectEffect, int damage, Strength strength, bool isMiss, bool isCritical, bool isDrain, bool isCounter, bool isReflection, ExtraEffectType extraEffectType)
 {
     SubStatePlayHitAnimationAction.Data.HitIcon hitIcon = new SubStatePlayHitAnimationAction.Data.HitIcon();
     hitIcon.target          = target;
     hitIcon.affectEffect    = affectEffect;
     hitIcon.damage          = damage;
     hitIcon.strength        = strength;
     hitIcon.isMiss          = isMiss;
     hitIcon.isCritical      = isCritical;
     hitIcon.isDrain         = isDrain;
     hitIcon.isCounter       = isCounter;
     hitIcon.isReflection    = isReflection;
     hitIcon.extraEffectType = extraEffectType;
     this.hitIconList.Add(hitIcon);
 }