Explorar o código

解决切换状态时子父物体bug

LAPTOP-OM1V99U2\永远de小亡灵 hai 1 ano
pai
achega
41f3a4f2f3
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      ActionTowerDefense/Assets/Scripts/MoveCharacter.cs

+ 1 - 1
ActionTowerDefense/Assets/Scripts/MoveCharacter.cs

@@ -120,7 +120,7 @@ public class MoveCharacter : Character
         if(outline1Mats.Length == 0)
         {
             Transform particleSystem = bodyTrans.GetChild(1).GetChild(0);
-            if (particleSystem == null)
+            if (particleSystem == null && particleSystem.name != "Particle System")
             {
                 return;
             }