Procházet zdrojové kódy

死亡清除指挥技状态

LAPTOP-OM1V99U2\永远de小亡灵 před 9 měsíci
rodič
revize
98022e47d9

+ 1 - 1
ActionTowerDefense/Assets/Resources/Prefab/Player.prefab

@@ -1046,7 +1046,7 @@ MonoBehaviour:
   - 1
   - 1
   - 1
-  conductSkills: 070000000000000004000000
+  conductSkills: 030000000000000004000000
   conductCanRelease: 010101
   conductReadyTip: {fileID: 946637326309089849}
   timeSlowingMultiplier: 0.15

+ 4 - 0
ActionTowerDefense/Assets/Scripts/Conduct/AngryBulletControl.cs

@@ -14,6 +14,10 @@ public class AngryBulletControl : MonoBehaviour
 
     void Update()
     {
+        if (playerController.isDie)
+        {
+            gameObject.SetActive(false);
+        }
         time += Time.deltaTime;
         if(time >= invokeTime)
         {

+ 1 - 1
ActionTowerDefense/Assets/Scripts/Conduct/Photosphere.cs

@@ -15,7 +15,7 @@ public class Photosphere : MonoBehaviour
     private void Update()
     {
         time += Time.deltaTime;
-        if (time >= stayTime)
+        if (time >= stayTime || owner.isDie)
         {
             owner.conductCanRelease[conductId] = true;
             gameObject.SetActive(false);

+ 1 - 1
ActionTowerDefense/Assets/Scripts/Conduct/SwordsControl.cs

@@ -36,7 +36,7 @@ public class SwordsControl : MonoBehaviour
     private void Update()
     {
         time += Time.deltaTime;
-        if (time >= totalTime)
+        if (time >= totalTime || owner.isDie)
         {
             owner.conductCanRelease[conductId] = true;
             parent.SetActive(false);

+ 14 - 5
ActionTowerDefense/Assets/Scripts/Conduct/WavePowerSkill.cs

@@ -52,6 +52,10 @@ public class WavePowerSkill : MonoBehaviour
 
     private void Update()
     {
+        if (pc.isDie)
+        {
+            ActiveFalse();
+        }
         if (curLength < maxLength)
         {
             curLength += longSpeed * Time.deltaTime;
@@ -62,16 +66,21 @@ public class WavePowerSkill : MonoBehaviour
             continueTime -= Time.deltaTime;
             if (continueTime <= 0)
             {
-                pc.conductCanRelease[cacheID] = true;
-                pc.canMove = true;
-                pc.rb.constraints = RigidbodyConstraints.FreezeRotation | RigidbodyConstraints.FreezePositionZ;
-                pc.rb.useGravity = true;
-                gameObject.SetActive(false);
+                ActiveFalse();
             }
         }
         AttackMode();
     }
 
+    public void ActiveFalse()
+    {
+        pc.conductCanRelease[cacheID] = true;
+        pc.canMove = true;
+        pc.rb.constraints = RigidbodyConstraints.FreezeRotation | RigidbodyConstraints.FreezePositionZ;
+        pc.rb.useGravity = true;
+        gameObject.SetActive(false);
+    }
+
     private void AttackMode()
     {
         switch (curMode)