LAPTOP-OM1V99U2\永远de小亡灵 1 년 전
부모
커밋
7328e281cf
3개의 변경된 파일12개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      ActionTowerDefense/Assets/Scripts/Character.cs
  2. 5 0
      ActionTowerDefense/Assets/Scripts/Demonic.cs
  3. 4 0
      ActionTowerDefense/Assets/Scripts/Enemy.cs

+ 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;