Browse Source

虾兵会朝着两边击飞

wgl 6 months ago
parent
commit
b71333e49b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      ActionTowerDefense/Assets/Scripts/Characters/AttributeStatus.cs

+ 2 - 2
ActionTowerDefense/Assets/Scripts/Characters/AttributeStatus.cs

@@ -113,13 +113,13 @@ public class AttributeStatus : MonoBehaviour
             case SpecialState.BlownUp:
             case SpecialState.BlownUp:
                 if (rb.useGravity)
                 if (rb.useGravity)
                 {
                 {
-                    AddBlowUp(attackInfo.blowUp, attackFrom.bodyTrans.localScale.x < 0 ? -1 : 1);
+                    AddBlowUp(attackInfo.blowUp, attackFrom.transform.position.x < character.transform.position.x ? -1 : 1);
                 }
                 }
                 break;
                 break;
             case SpecialState.ShotDown:
             case SpecialState.ShotDown:
                 if (!rb.useGravity)
                 if (!rb.useGravity)
                 {
                 {
-                    AddShotDown(attackInfo.shotDown, attackFrom.bodyTrans.localScale.x < 0 ? -1 : 1);
+                    AddShotDown(attackInfo.shotDown, attackFrom.transform.position.x < character.transform.position.x ? -1 : 1);
                 }
                 }
                 break;
                 break;
             case SpecialState.Weak:
             case SpecialState.Weak: