Răsfoiți Sursa

修复融魂技放不了的问题

WGL 1 lună în urmă
părinte
comite
e2996275bd

+ 5 - 18
ActionTowerDefense/Assets/Scripts/Characters/PlayerController.cs

@@ -537,8 +537,7 @@ public class PlayerController : MoveCharacter
         if (state != CharacterState.Conduct 
             && nowConductButton != -1 
             && conductController.conductSkills[nowConductButton] != ConductSkills.Null 
-            && conductTime > totalCacheSummonTime
-            && conductController.cd[nowConductButton] <= 0)
+            && conductTime > totalCacheSummonTime)
         {
             CheckTurn();
             ChangeState(CharacterState.Conduct);
@@ -578,24 +577,12 @@ public class PlayerController : MoveCharacter
         if (!isReadyConduct && nowConductButton != -1)
         {
             int boostNum = demonicDic[nowConductButton].Count;
-            if (conductController.bUseFixedSacrifice[nowConductButton])
+            dienum = conductController.sacrificeValue[nowConductButton];
+            if (boostNum < dienum)
             {
-                dienum = conductController.sacrificeValue[nowConductButton];
-                if (boostNum < dienum)
-                {
-                    dienum = 0;
-                }
-                
-            }
-            else
-            {
-                dienum = (int)(boostNum * conductController.conversionRate[nowConductButton] / 100 + 0.5f);
-                if (boostNum == 1)
-                {
-                    dienum = 1;
-                }
+                dienum = 0;
             }
-            
+
 
             if (conductTime >= canConductTime[nowConductButton] * timeSlowingMultiplier)
             {

+ 1 - 25
ActionTowerDefense/Assets/Scripts/Conduct/ConductController.cs

@@ -14,12 +14,9 @@ public class ConductController : MonoBehaviour
     private SoldierLevelRecord soldierLevelRecord;
 
     [LabelText("品质")] public int[] rarity;
-    [Tooltip("勾选定额;不勾选百分比")] public bool[] bUseFixedSacrifice;
     public float[] conversionRate;
     public int[] sacrificeValue;
-    
-    public float[] totalCD;
-    public float[] cd;
+   
     [LabelText("融魂技")] public ConductSkills[] conductSkills;
 
     public Photosphere photosphere;
@@ -72,29 +69,8 @@ public class ConductController : MonoBehaviour
         
     }
 
-    void Update()
-    {
-        for(int i = 0; i < 3; i++)
-        {
-            TextMeshProUGUI text = GameUI.instance.CD.GetChild(i).GetComponent<TextMeshProUGUI>();
-            if (cd[i] > 0)
-            {
-                cd[i] -= Time.deltaTime;
-                text.text = $"{(int)cd[i]}";
-                text.gameObject.SetActive(true);
-            }
-            else
-            {
-                text.gameObject.SetActive(false);
-            }
-        }
-    }
     public void Conduct(int demonicId, int dienum)
     {
-        if (!bUseFixedSacrifice[demonicId])
-        {
-            cd[demonicId] = totalCD[demonicId];
-        }
         GameObject obj;
         List<int> dieId = new List<int>();
         List<Demonic> dieDemonic = new List<Demonic>();