Ver código fonte

修复角色在天上走问题

WGL 3 meses atrás
pai
commit
cdadb63bb0

+ 5 - 0
ActionTowerDefense/Assets/Scripts/Characters/Foot.cs

@@ -28,6 +28,11 @@ public class Foot : MonoBehaviour
         moveCharacter = rb.transform.GetComponent<MoveCharacter>();
     }
 
+    private void OnDisable()
+    {
+        trigGroundList.Clear();
+    }
+
     private void Update()
     {
         if (trigGroundList.Count == 0)