Pārlūkot izejas kodu

暂存士兵击飞方向代码

wgl 6 mēneši atpakaļ
vecāks
revīzija
05533269fb

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

@@ -101,9 +101,7 @@ public class AttributeStatus : MonoBehaviour
             hitFeedbackSystem.EnterHitStun(attackFrom);
             return;
         }
-        
         hitFeedbackSystem.canHitStun = false;
-        Debug.Log(curSpecialStates);
         switch (curSpecialStates)
         {
             case SpecialState.FloatState:
@@ -112,15 +110,17 @@ public class AttributeStatus : MonoBehaviour
             case SpecialState.BlownUp:
                 if (rb.useGravity)
                 {
-                    AddBlowUp(attackInfo.blowUp, attackFrom.transform.position.x < character.transform.position.x ? -1 : 1);
+                    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:
-                Debug.Log(222);
                 if (!rb.useGravity)
                 {
-                    Debug.Log(111);
-                    AddShotDown(attackInfo.shotDown, attackFrom.transform.position.x < character.transform.position.x ? -1 : 1);
+                    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: