浏览代码

虾兵会朝着两边击飞

wgl 6 月之前
父节点
当前提交
b71333e49b
共有 1 个文件被更改,包括 2 次插入2 次删除
  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:
                 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;
             case SpecialState.ShotDown:
                 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;
             case SpecialState.Weak: