Prechádzať zdrojové kódy

修复玩家复活后水花有时候会消失问题

WGL 2 mesiacov pred
rodič
commit
a7e15ade8b

+ 7 - 0
ActionTowerDefense/Assets/Scripts/FX/PlayerFX.cs

@@ -31,6 +31,13 @@ public class PlayerFX : MonoBehaviour
                 
             }
         }
+        else
+        {
+            if(!owner.foot.TrigGround || !owner.foot.haveGravity)
+            {
+                Fx = null;
+            }
+        }
     }
     public void newOne()
     {

+ 0 - 1
ActionTowerDefense/Assets/Scripts/FX/Water_Ring.cs

@@ -46,7 +46,6 @@ public class Water_Ring : MonoBehaviour
                 {
                     particleSystems[i].Stop(false, ParticleSystemStopBehavior.StopEmitting);
                 }
-                owner.GetComponent<PlayerFX>().Fx = null;
                 isEnd = true;
             }