ソースを参照

修复击飞效果会被普攻影响问题

wgl 6 ヶ月 前
コミット
c482b5f8a8

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

@@ -262,12 +262,16 @@ public class AttributeStatus : MonoBehaviour
         if (curSpecialStates != SpecialState.Null && curSpecialStates >= specialState)
         {
             curSpecialStates = specialState;
+            this.attackInfo = attackInfo;
+            this.attackFrom = attackFrom;
             haveNewSpecialStates = true;
             return true;
         }
         if (curSpecialStates == SpecialState.Null)
         {
             curSpecialStates = specialState;
+            this.attackInfo = attackInfo;
+            this.attackFrom = attackFrom;
             haveNewSpecialStates = true;
             return true;
         }

+ 0 - 2
ActionTowerDefense/Assets/Scripts/Characters/MoveCharacter.cs

@@ -221,8 +221,6 @@ public class MoveCharacter : Character
         screenReflectPresets.ScreenReflect(hitFeedbackSystem, attackInfo.attackValue - hitResistance);
         base.BeHit(attackInfo, attackFrom);
         int damage = attackInfo.damage;
-        attributeStatus.attackInfo = attackInfo;
-        attributeStatus.attackFrom = attackFrom;
         if (attackInfo.attackEffect.Length > 0)
         {
             foreach (AttackEffect ae in attackInfo.attackEffect)

+ 4 - 1
ActionTowerDefense/Assets/Scripts/Conduct/MagicBullet.cs

@@ -35,6 +35,9 @@ public class MagicBullet : Bullet
         gameObject.SetActive(true);
         isGetTarget = false;
         flyTime = 0;
-        attackInfo.damage = damage;
+        attackInfo = new AttackInfo
+        {
+            damage = damage
+        };
     }
 }