Parcourir la source

修复角色在天上走问题

WGL il y a 3 mois
Parent
commit
cdadb63bb0
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  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)