Explorar o código

修复角色在天上走问题

WGL hai 3 meses
pai
achega
cdadb63bb0
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      ActionTowerDefense/Assets/Scripts/Characters/Foot.cs

+ 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)