瀏覽代碼

漏传了一些文件

HY-LSZNWIN10\Administrator 1 月之前
父節點
當前提交
5825113c45

+ 10 - 10
ActionTowerDefense/Assets/Scripts/Characters/Demonic.cs

@@ -739,7 +739,16 @@ public class Demonic : MoveCharacter
                 break;
             case CharacterState.Attack:
                 break;
-            case CharacterState.Die:           
+            case CharacterState.Die:
+                if (GameManager.instance.isSkyGroundIceEnable)
+                {
+                    int randomInt = Random.Range(0, 100);
+                    if (randomInt < GameManager.instance.skyGroundProbability)
+                    {
+                        player.nextSummonNum++;
+                        GameUI.instance.summonNum.text = player.nextSummonNum.ToString();
+                    }
+                }
                 if (canFly)
                 {
                     if (isDie)
@@ -751,15 +760,6 @@ public class Demonic : MoveCharacter
                     ChangeState(CharacterState.Fall);
                     isDie = true;
                     PlayersInput.instance[playerID].OnDemonicRecycle(this);
-                    if (GameManager.instance.isSkyGroundIceEnable)
-                    {
-                        int randomInt = Random.Range(0, 100);
-                        if (randomInt < GameManager.instance.skyGroundProbability)
-                        {
-                            player.nextSummonNum++;
-                            GameUI.instance.summonNum.text = player.nextSummonNum.ToString() ;
-                        }
-                    }
                     //if (GameManager.instance.isGroundEnable && !canFly)
                     //{
                     //    int randomInt = Random.Range(0, 100);

+ 10 - 43
ActionTowerDefense/Assets/Scripts/Characters/PlayerController.cs

@@ -1495,53 +1495,18 @@ public class PlayerController : MoveCharacter
         }
         mp -= costMp;
         uiMp.Show(mp, totalMp);
-        if (demonicPrefabs[id].GetComponent<Demonic>().canFly)
+        for (int i = 0; i < nextSummonNum; i++)
         {
-            for (int i = 0; i < nextSummonNum; i++)
+            Demonic demonic = CreateDemonic(id);
+            if (demonic.canFly)
             {
-                Demonic demonic = CreateDemonic(id);
                 if (i > 0) demonic.transform.position += new Vector3(Random.Range(-2, 2), Random.Range(-2, 2), 0);
-
-                int attackSummonId = nowAttackSummonID;
-
-                if (lastSoldier != demonic.soldierType)
-                {
-                    attackSummonId = 0;
-                }
-                demonic.attackController.attackSummonId = attackSummonId;
-                onlySummonTime = demonic.attackController.summonTime[attackSummonId];
-                invincibleTime = onlySummonTime + addSummonInvincibleTime;
-                restSummonTime = onlySummonTime;
-                demonic.Attack_summon();
-                lastSoldier = demonic.soldierType;
-                attackSummonId++;
-                if (attackSummonId >= demonic.attackController.attackMethod_summon.Length)
-                {
-                    attackSummonId = 0;
-                    AttackSummonChangeTime = 0;
-                }
-                else
-                {
-                    AttackSummonChangeTime = AttackSummonChangeTotalTime;
-                }
-                nowAttackSummonID = attackSummonId;
-                //id 3~6 ΪËĸöÓ¢Áé
-                if (id >= 3)
-                {
-                    spirits.ultimateTimes[id - 3] -= spirits.summonCost;
-                }
-                spiritSystem.RefreshPlayerUI();
-                if (isInSoulTower)
-                {
-                    ls.AddDenomic(demonic);
-                }
             }
-            nextSummonNum = 1;
-            GameUI.instance.summonNum.text = nextSummonNum.ToString();
-        }
-        else
-        {
-            Demonic demonic = CreateDemonic(id);
+            else
+            {
+                if (i > 0) demonic.transform.position += new Vector3(Random.Range(-2, 2), Random.Range(-0.5f, 0.5f), 0);
+            }
+
             int attackSummonId = nowAttackSummonID;
 
             if (lastSoldier != demonic.soldierType)
@@ -1576,6 +1541,8 @@ public class PlayerController : MoveCharacter
                 ls.AddDenomic(demonic);
             }
         }
+        nextSummonNum = 1;
+        GameUI.instance.summonNum.text = nextSummonNum.ToString();
 
     }