浏览代码

修复boss死亡后仍然被攻击的bug,修复boss root位置,优化boss关伤害数字生成性能

HY-LSZNWIN10\Administrator 10 小时之前
父节点
当前提交
2460691107

+ 7 - 7
ActionTowerDefense/Assets/Resources/Prefab/Boss/WaterSprite/Boss_Braid.prefab

@@ -648,7 +648,7 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 16214313449006091}
   m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
-  m_LocalPosition: {x: -0.36, y: -0.53, z: 0}
+  m_LocalPosition: {x: -0.36, y: 0.03, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children: []
@@ -1415,8 +1415,8 @@ BoxCollider:
   m_IsTrigger: 0
   m_Enabled: 1
   serializedVersion: 2
-  m_Size: {x: 0.6, y: 1.6503631, z: 2}
-  m_Center: {x: 0.14940321, y: 2.443654, z: 0}
+  m_Size: {x: 0.6, y: 3.104447, z: 2}
+  m_Center: {x: 0.14940321, y: 1.7166121, z: 0}
 --- !u!1 &16214314406868119
 GameObject:
   m_ObjectHideFlags: 0
@@ -1678,7 +1678,7 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 16214314734099186}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
-  m_LocalPosition: {x: -0.3600006, y: -0.83, z: 0}
+  m_LocalPosition: {x: -0.3600006, y: -0.27000004, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children:
@@ -1713,7 +1713,7 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 16214315070486859}
   m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
-  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalPosition: {x: 0.44, y: 0.49, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children: []
@@ -1732,7 +1732,7 @@ BoxCollider:
   m_Enabled: 1
   serializedVersion: 2
   m_Size: {x: 0.9, y: 0.5, z: 2}
-  m_Center: {x: 0.2, y: 3.25, z: 0}
+  m_Center: {x: 0.2, y: 0, z: 0}
 --- !u!114 &16214315070486857
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -1878,7 +1878,7 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 2439495398494907273}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
-  m_LocalPosition: {x: 0.15999937, y: 2.82, z: 0}
+  m_LocalPosition: {x: 0.15999937, y: 3.3799999, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children: []

+ 3 - 3
ActionTowerDefense/Assets/Resources/Prefab/Boss/WaterSprite/Boss_Umbrella.prefab

@@ -10098,9 +10098,9 @@ MeshRenderer:
   m_AutoUVMaxDistance: 0.5
   m_AutoUVMaxAngle: 89
   m_LightmapParameters: {fileID: 0}
-  m_SortingLayerID: 341237651
-  m_SortingLayer: 3
-  m_SortingOrder: 208
+  m_SortingLayerID: -1730265859
+  m_SortingLayer: 4
+  m_SortingOrder: 8
   m_AdditionalVertexStreams: {fileID: 0}
 --- !u!95 &5733499163905850020
 Animator:

+ 3 - 0
ActionTowerDefense/Assets/Scripts/Boss/Boss.cs

@@ -441,6 +441,9 @@ public class Boss : MoveCharacter
             case CharacterState.SpecialStatus_Weak:
                 attributeStatus.SpecialStateEffect(SpecialState.Weak);
                 break;
+            case CharacterState.Die:
+                isDie = true;
+                break;
             default:
                 break;
         }

+ 10 - 0
ActionTowerDefense/Assets/Scripts/Boss/WaterGhost/WaterSprite.cs

@@ -92,6 +92,15 @@ public class WaterSprite : Boss
         changeHPID++;
         curInterval = statOfPhase[bossPhase].maxInterval;
         StartCoroutine(Appear());
+        GameObject[] injuryNums = new GameObject[100];
+        for (int i = 0; i < 100; i++)
+        {
+            injuryNums[i] = PoolManager.Instantiate(injuryNumTextSummon);
+        }
+        foreach(GameObject injuryNum in injuryNums)
+        {
+            injuryNum.SetActive(false);
+        }
     }
 
     public override void Update()
@@ -249,6 +258,7 @@ public class WaterSprite : Boss
                 ChangeBossState(BossState.invincible);
                 StartCoroutine(DieEnd(13.067f));
                 ClearAllSkills();
+                isDie = true;
                 break;
             case CharacterState.Attack:
                 if (!isToBossRoom)