ソースを参照

修复变身结束foot报错

LAPTOP-OM1V99U2\永远de小亡灵 1 年間 前
コミット
97728e6894
1 ファイル変更1 行追加5 行削除
  1. 1 5
      ActionTowerDefense/Assets/Scripts/Foot.cs

+ 1 - 5
ActionTowerDefense/Assets/Scripts/Foot.cs

@@ -15,13 +15,9 @@ public class Foot : MonoBehaviour
     }
 
     public List<GameObject> trigGroundList;
-
-    private void Awake()
-    {
-        rb = GetComponentInParent<Rigidbody>();
-    }
     private void Update()
     {
+        rb = GetComponentInParent<Rigidbody>();
         if (trigGroundList.Count == 0)
         {
             if (!haveGravity)