LAPTOP-OM1V99U2\永远de小亡灵 11 달 전
부모
커밋
c5d5f80d49
1개의 변경된 파일6개의 추가작업 그리고 10개의 파일을 삭제
  1. 6 10
      ActionTowerDefense/Assets/Scripts/Demonic.cs

+ 6 - 10
ActionTowerDefense/Assets/Scripts/Demonic.cs

@@ -521,17 +521,13 @@ public class Demonic : MoveCharacter
                         aniCollider.Play("Hurt", 0, 0);
                     }
                     Vector3 vel = rb.velocity;
-                    if (!canFly)
+                    if (foot.TrigGround && vel.y < 0)
                     {
-                        if (foot.TrigGround && vel.y < 0)
-                        {
-                            vel.y = 0;
-                        }
-                        else
-                        {
-                            vel += Vector3.up * extraFallGravity * Time.deltaTime;
-                        }
-
+                        vel.y = 0;
+                    }
+                    else
+                    {
+                        vel += Vector3.up * extraFallGravity * Time.deltaTime;
                     }
 
                     vel.y = vel.y * (1 - decelerationRatio * Time.deltaTime);