Kaynağa Gözat

- 灵血聚合器

WGL 1 ay önce
ebeveyn
işleme
db1f172179

+ 24 - 5
ActionTowerDefense/Assets/Resources/Prefab/GameManager.prefab

@@ -99,11 +99,9 @@ MonoBehaviour:
   rockProbability: 50
   stoneHpRadio: 0.5
   isSkyEnable: 0
-  skyProbability: 30
+  attackRate: 0.01
   isGroundEnable: 0
-  groundProbability: 80
-  resurrectionTime: 3
-  deadHp: 20
+  hpRate: 0.01
   tagWeight:
   - 20
   - 15
@@ -126,6 +124,7 @@ MonoBehaviour:
   - 8
   trueRefreshChance: []
   refreshChance: []
+  damageRate: 0
   damage: 0
   criticalChance: 0
   regeneration: 0
@@ -229,7 +228,7 @@ MonoBehaviour:
     obj: {fileID: 256012001268456902, guid: 758282baf4c34f04a86e4bb81a0afbdd, type: 3}
   barrier:
     attributeTag: 4
-    bUseFixedSacrifice: 1
+    bUseFixedSacrifice: 0
     sacrificeRatio:
     - 100
     - 60
@@ -248,6 +247,26 @@ MonoBehaviour:
     - 3
     - 4
     obj: {fileID: 256012001268456902, guid: ba2e5bcb5c7ac604ea72b2fcb544a3cb, type: 3}
+  spiritBloodAggregator:
+    attributeTag: 5
+    bUseFixedSacrifice: 1
+    sacrificeRatio:
+    - 100
+    - 60
+    - 50
+    - 50
+    cd:
+    - 20
+    - 15
+    - 10
+    - 5
+    sacrificeValue: 0a0000000a0000000a0000000a000000
+    power: 01000000020000000300000004000000
+    effectBonus:
+    - 1
+    - 2
+    - 3
+    - 4
 --- !u!114 &1880576200062196086
 MonoBehaviour:
   m_ObjectHideFlags: 0

+ 31 - 2
ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Demonic_Arrow.prefab

@@ -187,6 +187,7 @@ MonoBehaviour:
   compressionSpeed: {x: 0.2, y: 0.4}
   jumpVel: 5
   haveVulnerable: 0
+  vulnerableRate: 0
   vulnerableTime: 0
   stackingWoudsTime: 0
   stackingWords: 0
@@ -1292,6 +1293,7 @@ GameObject:
   - component: {fileID: 8639832132491289349}
   - component: {fileID: 6589564398742701796}
   - component: {fileID: 7031356745553843355}
+  - component: {fileID: 8684670505913003432}
   m_Layer: 7
   m_Name: Demonic_Arrow
   m_TagString: Demonic
@@ -1423,17 +1425,19 @@ MonoBehaviour:
   heavyDamage: 0
   killer: {fileID: 0}
   isFrozen: 0
-  frozenTime: 0
   electrifyAttackSpeedScale: 0.6
   electrifyMoveSpeedScale: 0.6
   isElectrify: 0
-  electrifyTime: 0
   isPetrify: 0
   petrifyTime: 0
   petrifyHp: 0
+  isOnFire: 0
+  fireStacks: 0
   searchState: 0
+  bigSoldier: {fileID: 8684670505913003432}
   myName: "\u98DE\u5251"
   summonEndToDie: 0
+  canSizeChange: 0
   soldierType: 0
   player: {fileID: 0}
   playerID: 0
@@ -2062,3 +2066,28 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   ac: {fileID: 6589564398742701796}
+--- !u!114 &8684670505913003432
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 8639832132491289359}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 8562f76ec9f88004b9eade117489ef49, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  demonic: {fileID: 8639832132491289351}
+  stageSize:
+  - 1.5
+  - 2
+  - 3
+  - 4
+  giantDieNum: 0200000004000000080000000f000000
+  boostNum: 0
+  normalTotalHp: 0
+  normalSize: 0
+  itnHP: 100
+  changeSizeSpeed: 0.2
+  baseSortingOrder: 100

+ 38 - 2
ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Demonic_Giant.prefab

@@ -234,7 +234,6 @@ MonoBehaviour:
   owner: {fileID: 5440846222648032767}
   attackerID: 0
   curX: 0
-  mats: []
 --- !u!114 &8754430353800587234
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -416,6 +415,7 @@ MonoBehaviour:
   compressionSpeed: {x: 0.2, y: 0.4}
   jumpVel: 5
   haveVulnerable: 0
+  vulnerableRate: 0
   vulnerableTime: 0
   stackingWoudsTime: 0
   stackingWords: 0
@@ -666,6 +666,7 @@ GameObject:
   - component: {fileID: 5440846222648032765}
   - component: {fileID: 7709923136427189747}
   - component: {fileID: 802636448221205106}
+  - component: {fileID: 1496688819680216204}
   m_Layer: 7
   m_Name: Demonic_Giant
   m_TagString: Demonic
@@ -778,6 +779,7 @@ MonoBehaviour:
   outline1Mats:
   - {fileID: 2100000, guid: 82f4327af6aa844459ee45d1f72de829, type: 2}
   moveSpeed: 2
+  moveSpeedScale: 1
   isDamageReduction: 0
   reductionDegree: 0
   reductionEffect: {fileID: 0}
@@ -796,10 +798,19 @@ MonoBehaviour:
   heavyDamage: 0
   killer: {fileID: 0}
   isFrozen: 0
-  frozenTime: 0
+  electrifyAttackSpeedScale: 0.6
+  electrifyMoveSpeedScale: 0.6
+  isElectrify: 0
+  isPetrify: 0
+  petrifyTime: 0
+  petrifyHp: 0
+  isOnFire: 0
+  fireStacks: 0
   searchState: 0
+  bigSoldier: {fileID: 1496688819680216204}
   myName: "\u76FE\u7532\u5175"
   summonEndToDie: 0
+  canSizeChange: 0
   soldierType: 1
   player: {fileID: 0}
   playerID: 0
@@ -1094,6 +1105,31 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   ac: {fileID: 7709923136427189747}
+--- !u!114 &1496688819680216204
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 5440846222648032759}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 8562f76ec9f88004b9eade117489ef49, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  demonic: {fileID: 5440846222648032767}
+  stageSize:
+  - 1.5
+  - 2
+  - 3
+  - 4
+  giantDieNum: 0200000004000000080000000f000000
+  boostNum: 0
+  normalTotalHp: 0
+  normalSize: 0
+  itnHP: 100
+  changeSizeSpeed: 0.2
+  baseSortingOrder: 100
 --- !u!1 &6139679835290116115
 GameObject:
   m_ObjectHideFlags: 0

+ 38 - 2
ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Demonic_Sword.prefab

@@ -277,6 +277,7 @@ GameObject:
   - component: {fileID: 2437299196472462355}
   - component: {fileID: 6797330787108410633}
   - component: {fileID: 434976657695320859}
+  - component: {fileID: 1119516841680091051}
   m_Layer: 7
   m_Name: Demonic_Sword
   m_TagString: Demonic
@@ -389,6 +390,7 @@ MonoBehaviour:
   outline1Mats:
   - {fileID: 2100000, guid: 79dada70fee9fbc49a327168481d3def, type: 2}
   moveSpeed: 3
+  moveSpeedScale: 1
   isDamageReduction: 0
   reductionDegree: 0
   reductionEffect: {fileID: 0}
@@ -407,10 +409,19 @@ MonoBehaviour:
   heavyDamage: 0
   killer: {fileID: 0}
   isFrozen: 0
-  frozenTime: 0
+  electrifyAttackSpeedScale: 0.6
+  electrifyMoveSpeedScale: 0.6
+  isElectrify: 0
+  isPetrify: 0
+  petrifyTime: 0
+  petrifyHp: 0
+  isOnFire: 0
+  fireStacks: 0
   searchState: 0
+  bigSoldier: {fileID: 1119516841680091051}
   myName: "\u6797\u51B2"
   summonEndToDie: 0
+  canSizeChange: 0
   soldierType: 2
   player: {fileID: 0}
   playerID: 0
@@ -884,6 +895,31 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   ac: {fileID: 6797330787108410633}
+--- !u!114 &1119516841680091051
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2437299196472462361}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 8562f76ec9f88004b9eade117489ef49, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  demonic: {fileID: 2437299196472462353}
+  stageSize:
+  - 1.5
+  - 2
+  - 3
+  - 4
+  giantDieNum: 0200000004000000080000000f000000
+  boostNum: 0
+  normalTotalHp: 0
+  normalSize: 0
+  itnHP: 100
+  changeSizeSpeed: 0.2
+  baseSortingOrder: 100
 --- !u!1 &2437299196663985757
 GameObject:
   m_ObjectHideFlags: 0
@@ -1659,7 +1695,6 @@ MonoBehaviour:
   owner: {fileID: 2437299196472462353}
   attackerID: 0
   curX: 0
-  mats: []
 --- !u!114 &8560863157126245607
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -1841,6 +1876,7 @@ MonoBehaviour:
   compressionSpeed: {x: 0.2, y: 0.4}
   jumpVel: 5
   haveVulnerable: 0
+  vulnerableRate: 0
   vulnerableTime: 0
   stackingWoudsTime: 0
   stackingWords: 0

+ 3 - 1
ActionTowerDefense/Assets/Scripts/Bullet.cs

@@ -54,11 +54,13 @@ public class Bullet : MonoBehaviour
     [FoldoutGroup("条件")] [LabelText("子弹是否始终追踪")] [Tooltip("勾选:子弹会跟着目标转,不勾选:子弹斜着往前直飞")] public bool canAlwaysTrack;
     [FoldoutGroup("条件")] [LabelText("是否由士兵起手式创建")] public bool isCreatedByDemonicSummon = false;
     [FoldoutGroup("条件")] [LabelText("是否能穿过地面")] public bool canPassGround;
-    
+
+    public Vector3 originalScale;
 
     private void Awake()
     {
         rb = GetComponent<Rigidbody>();
+        originalScale = transform.localScale;
     }
   
     public virtual void Update()

+ 10 - 0
ActionTowerDefense/Assets/Scripts/Characters/AttackController.cs

@@ -485,6 +485,16 @@ public class AttackController : MonoBehaviour
         {
             bullet.canTransmit = true;
         }
+        Demonic demonic = owner as Demonic;
+        if (demonic.canSizeChange)
+        {
+            float rate = demonic.bigSoldier.nowSize;
+            bullet.transform.localScale = new Vector3(bullet.originalScale.x * rate, bullet.originalScale.y * rate, 1);
+        }
+        else
+        {
+            bullet.transform.localScale = bullet.originalScale;
+        }
         bullet.BeShoot(owner, curAttackMethod.shootPos[shootId].position, attackDir, curAttackMethod.shootTrack, 
             curAttackMethod.shootAlwaysTrack, owner.attackTarget ? owner.attackTarget : null);
     }

+ 5 - 2
ActionTowerDefense/Assets/Scripts/Characters/Demonic.cs

@@ -9,10 +9,12 @@ using Sirenix.OdinInspector;
 public class Demonic : MoveCharacter
 {
     [FoldoutGroup("组件")] [DisplayOnly]public SearchState searchState;
+    [FoldoutGroup("组件")] public BigSoldier bigSoldier;
 
     [FoldoutGroup("角色信息")] public string myName;
 
     [FoldoutGroup("条件")] [LabelText("释放起手式后死亡")] public bool summonEndToDie;
+    [FoldoutGroup("条件")] [LabelText("体型是否会变化")] public bool canSizeChange;
 
     [Space(30)]
     [Title("Demonic属性")]
@@ -779,7 +781,6 @@ public class Demonic : MoveCharacter
                     rb.velocity = Vector3.zero;
                     ChangeState(CharacterState.Fall);
                     isDie = true;
-                    summonEndToDie = false;
                     PlayersInput.instance[playerID].OnDemonicRecycle(this);
                     //if (GameManager.instance.isSkyEnable && canFly)
                     //{
@@ -805,7 +806,6 @@ public class Demonic : MoveCharacter
                     isDie = true;
                     ani.Play(AnimatorHash.ANIMATOR_die, 0, 0);
                     dieKeepTime = totalDieKeepTime;
-                    summonEndToDie = false;
                     PlayersInput.instance[playerID].OnDemonicRecycle(this);
                     //if (GameManager.instance.isGroundEnable && !canFly)
                     //{
@@ -818,6 +818,9 @@ public class Demonic : MoveCharacter
                     //    }
                     //}
                 }
+                summonEndToDie = false;
+                canSizeChange = false;
+                bigSoldier.enabled = false;
                 break;
             case CharacterState.LockSoul:
                 rb.velocity = Vector3.zero;

+ 1 - 0
ActionTowerDefense/Assets/Scripts/Characters/MoveCharacter.cs

@@ -133,6 +133,7 @@ public class MoveCharacter : Character
     public override void Init()
     {
         base.Init();
+        transform.localScale = Vector3.one;
         mecanim.transform.localPosition = Vector3.zero;
         mecanim.transform.localRotation = Quaternion.Euler(Vector3.zero);
         platformRotZ = 0;

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

@@ -1501,15 +1501,7 @@ public class PlayerController : MoveCharacter
             {
                 Demonic demonic = CreateDemonic(id);
                 if (i > 0) demonic.transform.position += new Vector3(Random.Range(-2, 2), Random.Range(-2, 2), 0);
-                if (!demonicDic.ContainsKey(id))
-                {
-                    demonicDic.Add(id, new List<Demonic>());
-                }
-                demonicDic[id].Add(demonic);
-                if (id <= 2)
-                {
-                    demonicNums[id].text = demonicDic[id].Count.ToString();
-                }
+
                 int attackSummonId = nowAttackSummonID;
 
                 if (lastSoldier != demonic.soldierType)
@@ -1549,15 +1541,6 @@ public class PlayerController : MoveCharacter
         else
         {
             Demonic demonic = CreateDemonic(id);
-            if (!demonicDic.ContainsKey(id))
-            {
-                demonicDic.Add(id, new List<Demonic>());
-            }
-            demonicDic[id].Add(demonic);
-            if (id <= 2)
-            {
-                demonicNums[id].text = demonicDic[id].Count.ToString();
-            }
             int attackSummonId = nowAttackSummonID;
 
             if (lastSoldier != demonic.soldierType)
@@ -1672,6 +1655,15 @@ public class PlayerController : MoveCharacter
         demonic.Init();
         int order = demonicPrefabs[id].GetComponent<Demonic>().baseSortingOrder + demonicDic[demonic.id].Count;
         demonic.SetSortingOrder(order);
+        if (!demonicDic.ContainsKey(id))
+        {
+            demonicDic.Add(id, new List<Demonic>());
+        }
+        demonicDic[id].Add(demonic);
+        if (id <= 2)
+        {
+            demonicNums[id].text = demonicDic[id].Count.ToString();
+        }
         return demonic;
     }
     public void OnDemonicRecycle(Demonic demonic)

+ 27 - 36
ActionTowerDefense/Assets/Scripts/Conduct/BigSoldier.cs

@@ -1,27 +1,35 @@
+using Sirenix.OdinInspector;
 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 
-public class BigSoldier : Demonic
+public class BigSoldier : MonoBehaviour
 {
+    [FoldoutGroup("组件")] public Demonic demonic;
+
     [Header("巨人形态")]
     public float[] stageSize;
     public int[] giantDieNum;
     public int boostNum;
-    public GameObject normalDem;
-    private int normalTotalHp;
-    private float origSize;
-    private float normalSize;
+    public int normalTotalHp;
+    public float origSize;
+    public float normalSize;
     [Header("每间隔多少血量改变大小")]
     public int itnHP = 100;
     private int nextRefHP;
     private float itnHP_Size;   //大小=正常大小+高出正常血量的hp*itnHP_Size
                                 //itnHP_Size=(原大小-正常大小)/(原血量-正常血量)
     private bool isChange;
-    private float toSize;
-    private float nowSize;
+    public float toSize;
+    public float nowSize;
     [Header("巨人体型变化速度")]
     public float changeSizeSpeed;
+    public int baseSortingOrder;
+
+    public void Awake()
+    {
+        normalSize = transform.localScale.x;
+    }
 
     public float TranSize_Num(int dieNum)
     {
@@ -42,21 +50,21 @@ public class BigSoldier : Demonic
 
     public void TranSize_HP()
     {
-        if (hp <= normalTotalHp)
+        if (demonic.hp <= normalTotalHp)
         {
             toSize = normalSize;
             isChange = true;
             nextRefHP = 0;
             return;
         }
-        toSize = origSize - (totalHp - hp) * itnHP_Size;
+        toSize = origSize - (demonic.totalHp - demonic.hp) * itnHP_Size;
         isChange = true;
         if (nextRefHP == normalTotalHp)
         {
             nextRefHP = 0;
             return;
         }
-        while (hp <= nextRefHP)
+        while (demonic.hp <= nextRefHP)
         {
             nextRefHP -= itnHP;
             if (nextRefHP <= normalTotalHp)
@@ -71,35 +79,14 @@ public class BigSoldier : Demonic
         origSize = TranSize_Num(boostNum);
         nowSize = origSize;
         transform.localScale = new Vector3(1, 1, 1) * origSize;
-        totalHp = (int)(TranSize_Num(boostNum) * totalHp);
-        normalTotalHp = normalDem.GetComponent<Character>().totalHp;
-        normalSize = normalDem.transform.localScale.x;
-        itnHP_Size = (transform.localScale.x - normalSize) / (totalHp - normalTotalHp);
-        nextRefHP = totalHp - itnHP;
-        Init();
-    }
-
-    public override void BeHit(int damage)
-    {
-        base.BeHit(damage);
-        if (hp <= nextRefHP && hp > 0)
-        {
-            TranSize_HP();
-        }
+        itnHP_Size = (transform.localScale.x - normalSize) / (demonic.totalHp - normalTotalHp);
+        nextRefHP = demonic.totalHp - itnHP;
+        demonic.canSizeChange = true;
+        this.enabled = true;
     }
 
-    public override void BeHit(AttackController.AttackMethod attackMethod, Character attackFrom, int damage = -1)
+    public void Update()
     {
-        base.BeHit(attackMethod, attackFrom);
-        if (hp <= nextRefHP && hp > 0)
-        {
-            TranSize_HP();
-        }
-    }
-
-    public override void Update()
-    {
-        base.Update();
         if (isChange)
         {
             if (nowSize >= toSize)
@@ -113,5 +100,9 @@ public class BigSoldier : Demonic
                 transform.localScale = Vector3.one * nowSize;
             }
         }
+        if (demonic.hp <= nextRefHP && demonic.hp > 0)
+        {
+            TranSize_HP();
+        }
     }
 }

+ 18 - 45
ActionTowerDefense/Assets/Scripts/Conduct/ConductController.cs

@@ -127,15 +127,14 @@ public class ConductController : MonoBehaviour
         List<int> myTreasureTag = gameManager.myTreasuresTag;
         float tagAdd = 1;
         int demonicRarity = rarity[demonicId];
+        Demonic demonic;
         switch (conductSkills[demonicId])
         {
             case ConductSkills.NetherfireRebirth:
                 ConductManager.NetherfireRebirth netherfireRebirth = conductManager.netherfireRebirth;
                 for (int i = 0; i < dienum * netherfireRebirth.power[demonicRarity]; i++)
                 {
-                    Demonic demonic = playerController.CreateDemonic(demonicId);
-                    playerDemonic.Add(demonic);
-                    playerController.demonicNums[demonicId].text = playerDemonic.Count.ToString();
+                    demonic = playerController.CreateDemonic(demonicId);
                     if (netherfireRebirth.canDie)
                     {
                         demonic.summonEndToDie = true;
@@ -194,52 +193,26 @@ public class ConductController : MonoBehaviour
                     this.photosphere = photosphere;
                 }
                 obj.transform.position = transform.position + Vector3.up;
-                photosphere.hp = prefabDemonic.totalHp + soldierExtraBuff.hp + gameManager.totalHp;
+                tagAdd += barrier.effectBonus[demonicRarity] * myTreasureTag[(int)barrier.attributeTag - 1] / 100;
+                photosphere.hp = (int)((prefabDemonic.totalHp + soldierExtraBuff.hp + gameManager.totalHp)*dienum * barrier.power[demonicRarity] * tagAdd);
                 photosphere.conductController = this;
                 break;
             case ConductSkills.SpiritBloodAggregator:
                 ConductManager.SpiritBloodAggregator spiritBloodAggregator = conductManager.spiritBloodAggregator;
-                //GameObject demonicObj = PoolManager.Instantiate(giant.bigGiant);
-                //BigSoldier bs = demonicObj.GetComponent<BigSoldier>();
-                //bs.id = demonicId + 3;
-                //playerController.demonicDic[bs.id].Add(bs);
-                //if (bs.id < 3)
-                //{
-                //    playerController.demonicNums[bs.id].text = playerController.demonicDic[bs.id].Count.ToString();
-                //}
-                //int tempthp = boostNum * giant.temptHp;
-                //bs.playerID = playerController.playerId;
-                //demonicObj.transform.parent = null;
-                //demonicObj.transform.localEulerAngles = Vector3.zero;
-                //bs.boostNum = boostNum;
-                //if (playerController.isInSoulTower)
-                //{
-                //    playerController.ls.AddDenomic(bs);
-                //}
-                //bs.player = playerController;
-                //bs.Settings();
-                //bs.GetTemptHP(tempthp, giant.temptTime);
-                //int order = bs.baseSortingOrder + playerController.demonicDic[bs.id].Count;
-                //bs.SetSortingOrder(order);
-                //Vector3 offset = playerController.demonicSummonPos[0] * 2;
-                //if (playerController.bodyTrans.localScale.x > 0)
-                //{
-                //    demonicObj.transform.position = transform.position + offset;
-                //    if (bs.bodyTrans.localScale.x < 0)
-                //    {
-                //        bs.Turn();
-                //    }
-                //}
-                //else
-                //{
-                //    demonicObj.transform.position = transform.position + new Vector3(-offset.x, offset.y, offset.z);
-                //    if (bs.bodyTrans.localScale.x > 0)
-                //    {
-                //        bs.Turn();
-                //    }
-                //}
-                //bs.Attack_summon();
-                //demonicObj.SetActive(true);
+                demonic = playerController.CreateDemonic(demonicId);
+                BigSoldier bs = demonic.GetComponent<BigSoldier>();
+                bs.normalTotalHp =demonic.totalHp;
+                bs.boostNum = dienum;
+                bs.Settings();
+                tagAdd += spiritBloodAggregator.effectBonus[demonicRarity] * myTreasureTag[(int)spiritBloodAggregator.attributeTag - 1] / 100;
+                int totalHp = demonic.totalHp * spiritBloodAggregator.power[demonicRarity] * dienum;
+                demonic.totalHp = (int)(totalHp * tagAdd);
+                demonic.hp = demonic.totalHp;
+                demonic.attackController.attackSummonId = 0;
+                demonic.Attack_summon();
+                playerController.lastSoldier = SoldierType.Conduct;
+                int order = bs.baseSortingOrder + playerController.demonicDic[demonicId].Count;
+                demonic.SetSortingOrder(order);
                 break;
         }
     }

+ 0 - 1
ActionTowerDefense/Assets/Scripts/Conduct/ConductManager.cs

@@ -85,7 +85,6 @@ public class ConductManager : MonoBehaviour
         [ShowIf("bUseFixedSacrifice")] [LabelText("献祭数量")] public int[] sacrificeValue;
         [LabelText("效果规模")] public int[] power;
         [LabelText("效果加成(%)")] public float[] effectBonus;
-        public GameObject obj;
     }
     [LabelText("灵血聚合器")] public SpiritBloodAggregator spiritBloodAggregator;
 

+ 10 - 5
ActionTowerDefense/Assets/Scripts/Conduct/Photosphere.cs

@@ -8,7 +8,8 @@ public class Photosphere : MonoBehaviour
     //组件
     public ConductController conductController;
     
-    [LabelText("停留时间")]public float stayTime;
+    [LabelText("有停留时间")]public bool haveStayTime;
+    [ShowIf("haveStayTime")][LabelText("停留时间")]public float stayTime;
     [LabelText("破碎特效")]public GameObject breakEffect;
     private float time;
     [Header("吸收伤害")]public int hp;
@@ -16,7 +17,6 @@ public class Photosphere : MonoBehaviour
     [Header("反伤率")] public float rate;
     private void Update()
     {
-        time += Time.deltaTime;
         if (hp <= 0)
         {
             conductController.photosphere = null;
@@ -24,11 +24,16 @@ public class Photosphere : MonoBehaviour
             trans.position = transform.position;
             gameObject.SetActive(false);
         }
-        if (time >= stayTime || hp<= 0)
+        if (haveStayTime)
         {
-            conductController.photosphere = null;
-            gameObject.SetActive(false);
+            time += Time.deltaTime;
+            if (time >= stayTime)
+            {
+                conductController.photosphere = null;
+                gameObject.SetActive(false);
+            }
         }
+
     }
 
     public void Reflex(BeHitTrigger beHitTrigger,int damage)

+ 0 - 9
ActionTowerDefense/Assets/Scripts/SoulDead.cs

@@ -114,15 +114,6 @@ public class SoulDead : Character
         Demonic demonic =  player.CreateDemonic(demonicId);
         demonic.transform.position = transform.position;
         demonic.attackController.attackSummonId = 0;
-        if (!player.demonicDic.ContainsKey(demonicId))
-        {
-            player.demonicDic.Add(demonicId, new List<Demonic>());
-        }
-        player.demonicDic[demonicId].Add(demonic);
-        if (demonicId <= 2)
-        {
-            player.demonicNums[demonicId].text = player.demonicDic[demonicId].Count.ToString();
-        }
         demonic.Attack_summon();
     }