Browse Source

修复士兵升级攻击力出错的问题

WGL 2 months ago
parent
commit
fd30d022da
1 changed files with 3 additions and 1 deletions
  1. 3 1
      ActionTowerDefense/Assets/Scripts/Characters/SoldierBuff.cs

+ 3 - 1
ActionTowerDefense/Assets/Scripts/Characters/SoldierBuff.cs

@@ -23,7 +23,9 @@ public class SoldierBuff : MonoBehaviour
         initHp = dem.hp;
         for (int i = 0; i < ac.attackMethod.Length; i++)
         {
-            initAttackInfo.Add(ac.attackMethod[i].attackInfo);
+            AttackInfo attackInfo = new();
+            ac.attackMethod[i].attackInfo.CopyTo(attackInfo);
+            initAttackInfo.Add(attackInfo);
         }
         initArmor = ats.resistances.armor;
     }