Selaa lähdekoodia

修复变身结束foot报错

LAPTOP-OM1V99U2\永远de小亡灵 1 vuosi sitten
vanhempi
commit
97728e6894
1 muutettua tiedostoa jossa 1 lisäystä ja 5 poistoa
  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)