Browse Source

蓄力时间和动画不受慢动作影响

LAPTOP-OM1V99U2\永远de小亡灵 10 months ago
parent
commit
793ef5f2b0
1 changed files with 8 additions and 2 deletions
  1. 8 2
      ActionTowerDefense/Assets/Scripts/PlayerController.cs

+ 8 - 2
ActionTowerDefense/Assets/Scripts/PlayerController.cs

@@ -699,12 +699,15 @@ public class PlayerController : MoveCharacter
         }
         if (!isReadyConduct && nowConductButton != -1) 
         {
-            if(conductTime >= canConductTime[nowConductButton])
+            if(conductTime >= canConductTime[nowConductButton] * timeSlowingMultiplier)
             {
                 isReadyConduct = true;
             }
-            else if(conductTime >= canConductTime[nowConductButton] - readyTipFxTime && conductTime >= totalCacheSummonTime)
+            else if(conductTime >= (canConductTime[nowConductButton] - readyTipFxTime) * timeSlowingMultiplier && conductTime >= totalCacheSummonTime)
             {
+                ParticleSystem ps = conductReadyTip.starFx.GetComponent<ParticleSystem>();
+                var main = ps.main;
+                main.simulationSpeed = timeSlowingMultiplier;
                 Time.timeScale = timeSlowingMultiplier;
                 conductReadyTip.Show();
             }
@@ -1847,6 +1850,9 @@ public class PlayerController : MoveCharacter
                 break;
             case CharacterState.Conduct:
                 rb.isKinematic = false;
+                ParticleSystem ps = conductReadyTip.starFx.GetComponent<ParticleSystem>();
+                var main = ps.main;
+                main.simulationSpeed = timeSlowingMultiplier;
                 Time.timeScale = 1;
                 break;
             default: