浏览代码

修复变身结束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)