Browse Source

抗性拉满后控制效果无效

WGL 3 months ago
parent
commit
08f7222a90
1 changed files with 16 additions and 0 deletions
  1. 16 0
      ActionTowerDefense/Assets/Scripts/Characters/AttributeStatus.cs

+ 16 - 0
ActionTowerDefense/Assets/Scripts/Characters/AttributeStatus.cs

@@ -442,6 +442,10 @@ public class AttributeStatus : MonoBehaviour
     //忳善⑸腹
     //忳善⑸腹
     public void AddFloat(AttackInfo attackInfo)
     public void AddFloat(AttackInfo attackInfo)
     {
     {
+        if(resistances.Float == 1)
+        {
+            return;
+        }
         this.attackInfo = attackInfo;
         this.attackInfo = attackInfo;
         AttackInfo.FloatState floatState = attackInfo.floatState;
         AttackInfo.FloatState floatState = attackInfo.floatState;
         rb.useGravity = false;
         rb.useGravity = false;
@@ -465,6 +469,10 @@ public class AttributeStatus : MonoBehaviour
     //忳善僻滄
     //忳善僻滄
     public void AddBlowUp(AttackInfo attackInfo, Transform attackFrom)
     public void AddBlowUp(AttackInfo attackInfo, Transform attackFrom)
     {
     {
+        if(resistances.BlowUp == 1)
+        {
+            return;
+        }
         this.attackInfo = attackInfo;
         this.attackInfo = attackInfo;
         AttackInfo.BlowUp blowUp = attackInfo.blowUp;
         AttackInfo.BlowUp blowUp = attackInfo.blowUp;
         attributeTime = blowUp.time * (1 - resistances.BlowUp);
         attributeTime = blowUp.time * (1 - resistances.BlowUp);
@@ -506,6 +514,10 @@ public class AttributeStatus : MonoBehaviour
     //忳善僻邈
     //忳善僻邈
     public void AddShotDown(AttackInfo attackInfo, Transform attackFrom)
     public void AddShotDown(AttackInfo attackInfo, Transform attackFrom)
     {
     {
+        if(resistances.ShotDown == 1)
+        {
+            return;
+        }
         this.attackInfo = attackInfo;
         this.attackInfo = attackInfo;
         AttackInfo.ShotDown shotDown = attackInfo.shotDown;
         AttackInfo.ShotDown shotDown = attackInfo.shotDown;
         attributeTime = shotDown.time * (1 - resistances.ShotDown);
         attributeTime = shotDown.time * (1 - resistances.ShotDown);
@@ -544,6 +556,10 @@ public class AttributeStatus : MonoBehaviour
     //忳善僻婠
     //忳善僻婠
     public void AddWeak(AttackInfo attackInfo)
     public void AddWeak(AttackInfo attackInfo)
     {
     {
+        if(resistances.Weak == 1)
+        {
+            return;
+        }
         this.attackInfo = attackInfo;
         this.attackInfo = attackInfo;
         AttackInfo.Weak weak = attackInfo.weak;
         AttackInfo.Weak weak = attackInfo.weak;
         attributeTime = weak.time * (1 - resistances.Weak);
         attributeTime = weak.time * (1 - resistances.Weak);