瀏覽代碼

修复砖头怪不动且不会被打飞问题

LAPTOP-OM1V99U2\永远de小亡灵 1 年之前
父節點
當前提交
dfa2bbc6d1
共有 1 個文件被更改,包括 0 次插入25 次删除
  1. 0 25
      ActionTowerDefense/Assets/Scripts/Boss/YuMenGuan/Block.cs

+ 0 - 25
ActionTowerDefense/Assets/Scripts/Boss/YuMenGuan/Block.cs

@@ -56,29 +56,6 @@ public class Block : Character
     {
         curWarning = Instantiate(warning, posYZ, new Quaternion(0, 0, 0, 0), transform);
         curWarning.SetActive(false);
-        SetAttackTrigger(0);
-    }
-
-    private void SetAttackTrigger(int id)
-    {
-        AttackInfo attack = new AttackInfo();
-        switch (id)
-        {
-            case 0:
-                attack = outDamage;
-                break;
-            default:
-                break;
-        }
-        attackTriggers[id].damage = attack.damage;
-        attackTriggers[id].changeHurt = attack.changeHurt;
-        attackTriggers[id].repelValue = attack.repelValue;
-        Vector3 attackDir = attack.attackDir.normalized;
-        if (bodyTrans.localScale.x < 0)
-        {
-            attackDir.x = -attackDir.x;
-        }
-        attackTriggers[id].force = attackDir * attack.force;
     }
 
     private void OnEnable()
@@ -185,7 +162,6 @@ public class Block : Character
         {
             case State.outGround:
                 rb.velocity = Vector3.zero;
-                attackTriggers[0].enabled = false;
                 break;
             case State.charge:
                 break;
@@ -219,7 +195,6 @@ public class Block : Character
                 break;
             case State.none:
                 rb.velocity = Vector3.zero;
-                attackTriggers[0].enabled = false;
                 break;
             case State.back:
                 rb.useGravity = true;