Przeglądaj źródła

虾兵会朝着两边击飞

wgl 6 miesięcy temu
rodzic
commit
b71333e49b

+ 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: