LAPTOP-OM1V99U2\永远de小亡灵 пре 1 година
родитељ
комит
7328e281cf

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

@@ -65,6 +65,8 @@ public class Character : MonoBehaviour
     public Rigidbody rb;
     public Transform bodyTrans;
     public BeSearchTrigger beSearchTrigger;
+    public BeHitTrigger beHitTrigger;
+    public GameObject bodyCollider;
     public UIHP uiHp;
 
     public CharacterState state;
@@ -77,6 +79,7 @@ public class Character : MonoBehaviour
 
     public HpUpType hptp;
     public bool isDie = false;
+    public bool isRevive;
     public int totalHp = 100;
     public int hp;
     public List<AttackInfo> attack1Infos;

+ 5 - 0
ActionTowerDefense/Assets/Scripts/Demonic.cs

@@ -528,6 +528,11 @@ public class Demonic : MoveCharacter
                 rb.velocity = Vector3.zero;
                 break;
             case CharacterState.Rise:
+                if (!canFly)
+                {
+                    bodyCollider.SetActive(true);
+                }
+                
                 break;
             case CharacterState.Fall:
                 rb.velocity = Vector3.zero;

+ 4 - 0
ActionTowerDefense/Assets/Scripts/Enemy.cs

@@ -611,6 +611,10 @@ public class Enemy : MoveCharacter
                 rb.velocity = Vector3.zero;
                 break;
             case CharacterState.Rise:
+                if (!canFly)
+                {
+                    bodyCollider.SetActive(true);
+                }
                 break;
             case CharacterState.Fall:
                 rb.velocity = Vector3.zero;