Prechádzať zdrojové kódy

修复打出僵直会报错问题

wgl 6 mesiacov pred
rodič
commit
92e95c5ab7

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

@@ -262,16 +262,12 @@ 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;
         }

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

@@ -221,6 +221,8 @@ 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/Characters/PlayerController.cs

@@ -1824,7 +1824,10 @@ public class PlayerController : MoveCharacter
 
     public override void BeHit(AttackInfo attackInfo, Character attackFrom)
     {
-        //conductController.
+        if (conductController.HavePhoton(attackFrom, attackInfo.damage))
+        {
+            return;
+        }
         base.BeHit(attackInfo, attackFrom);
         //ÆÁÄ»ºìÉÁ+¶¶¶¯
         if (ss == null)