Ver Fonte

融魂技巨型胖子不随血量变化的bug修复

SZAND\msx_2 há 4 meses atrás
pai
commit
69306d0ae7

+ 14 - 12
ActionTowerDefense/Assets/Resources/Prefab/Conduct/Demonic_BigGiant.prefab

@@ -94,7 +94,7 @@ MonoBehaviour:
   canBreakWall: 0
   wallBrealNum: 10
   isShoot: 0
-  type: 0
+  type: 1
   owner: {fileID: 0}
   isSingleAttack: 0
   cantSingleAttack: 0
@@ -610,7 +610,7 @@ MonoBehaviour:
   injuryNumPos_march: {x: 0, y: 1}
   injuryNumRandom_march: {x: 2, y: 2}
   dieKeepTime: 0
-  beHitDistance: 0
+  beHitDistance: 2
   attackDis: 0
   targetCharacter: {fileID: 0}
   attackTarget: {fileID: 0}
@@ -625,7 +625,7 @@ MonoBehaviour:
   isRevive: 0
   invincibleTime: 0
   isBeHitBySummonAttack: 0
-  statePre: {fileID: 0}
+  statePre: {fileID: 4272231268506418309, guid: cf5ca93704f49c744b0d6cfc2cd25a01, type: 3}
   ls: {fileID: 0}
   isInSoulTower: 0
   beLarger: 0
@@ -676,7 +676,7 @@ MonoBehaviour:
   heavyDamage: 0
   killer: {fileID: 0}
   searchState: 0
-  soldierType: 0
+  soldierType: 2
   player: {fileID: 0}
   playerID: 0
   id: 0
@@ -704,6 +704,11 @@ MonoBehaviour:
   boostNum: 0
   normalDem: {fileID: 5440846222648032759, guid: 05825e721b2832f478f66e78daed901f, type: 3}
   itnHP: 100
+  nextRefHP: 0
+  itnHP_Size: 0
+  isChange: 0
+  toSize: 0
+  nowSize: 0
   changeSizeSpeed: 0.2
 --- !u!114 &1713614217752587255
 MonoBehaviour:
@@ -789,8 +794,6 @@ MonoBehaviour:
     isDemSummon: 0
   addAttackEffect: {fileID: 0}
   skill: {fileID: 0}
-  attackEffect: {fileID: 0}
-  effect: {fileID: 0}
   attackDistance: 0
   attackTrigger: {fileID: 7729941002223262554}
   isAttackTriggerOn: 0
@@ -846,7 +849,7 @@ MonoBehaviour:
         damage: 0
       isDemSummon: 0
     attackTrigger: {fileID: 7729941002223262554}
-    attackDistance: 0
+    attackDistance: 3
     maxAttackDis: 0
     minAttackDis: 0
     needToChange: 0
@@ -859,7 +862,6 @@ MonoBehaviour:
     maxDownAngle: 0
     shootTrack: 0
     shootAlwaysTrack: 0
-    skillPrefab: {fileID: 0}
     skill: {fileID: 0}
   - id: 1
     attackName: "\u884C\u519B\u5F0F\u6376\u5730"
@@ -906,7 +908,7 @@ MonoBehaviour:
         damage: 0
       isDemSummon: 0
     attackTrigger: {fileID: 7729941002223262554}
-    attackDistance: 0
+    attackDistance: 3
     maxAttackDis: 0
     minAttackDis: 0
     needToChange: 0
@@ -919,7 +921,6 @@ MonoBehaviour:
     maxDownAngle: 0
     shootTrack: 0
     shootAlwaysTrack: 0
-    skillPrefab: {fileID: 0}
     skill: {fileID: 0}
   curAttackMethod:
     id: 0
@@ -980,7 +981,6 @@ MonoBehaviour:
     maxDownAngle: 0
     shootTrack: 0
     shootAlwaysTrack: 0
-    skillPrefab: {fileID: 0}
     skill: {fileID: 0}
 --- !u!1 &6139679835290116115
 GameObject:
@@ -1048,7 +1048,7 @@ BoxCollider:
   m_IsTrigger: 1
   m_Enabled: 1
   serializedVersion: 2
-  m_Size: {x: 20, y: 10, z: 20}
+  m_Size: {x: 20, y: 4, z: 20}
   m_Center: {x: 0, y: 2, z: 0}
 --- !u!1 &6239053045979137450
 GameObject:
@@ -1224,6 +1224,8 @@ MeshRenderer:
   m_Materials:
   - {fileID: 2100000, guid: 466a6130b6c56614caef9c2f5961b3a8, type: 2}
   - {fileID: 2100000, guid: dc7a2704fc39fb24997c9f6279033f5c, type: 2}
+  - {fileID: 2100000, guid: 466a6130b6c56614caef9c2f5961b3a8, type: 2}
+  - {fileID: 2100000, guid: dc7a2704fc39fb24997c9f6279033f5c, type: 2}
   m_StaticBatchInfo:
     firstSubMesh: 0
     subMeshCount: 0

+ 10 - 1
ActionTowerDefense/Assets/Scripts/Conduct/BigSoldier.cs

@@ -16,7 +16,7 @@ public class BigSoldier : Demonic
     public int itnHP = 100;
     private int nextRefHP;
     private float itnHP_Size;   //大小=正常大小+高出正常血量的hp*itnHP_Size
-    //itnHP_Size=(原大小-正常大小)/(原血量-正常血量)
+                                //itnHP_Size=(原大小-正常大小)/(原血量-正常血量)
     private bool isChange;
     private float toSize;
     private float nowSize;
@@ -88,6 +88,15 @@ public class BigSoldier : Demonic
         }
     }
 
+    public override void BeHit(AttackInfo attackInfo, Character attackFrom)
+    {
+        base.BeHit(attackInfo, attackFrom);
+        if (hp <= nextRefHP && hp > 0)
+        {
+            TranSize_HP();
+        }
+    }
+
     public override void Update()
     {
         base.Update();