소스 검색

摔落伤害

SZAND\msx_2 1 년 전
부모
커밋
7e0532fc9a
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      ActionTowerDefense/Assets/Scripts/MoveCharacter.cs

+ 2 - 2
ActionTowerDefense/Assets/Scripts/MoveCharacter.cs

@@ -261,12 +261,12 @@ public class MoveCharacter : Character
         else if (floatState == 3)
         {
             aniCollider.Play("Fall", 0, 0);
-            if (transform.position.y >= origY + 0.05f)
+            if (!isBeDropped && transform.position.y >= origY + 0.05f || isBeDropped && !foot.TrigGround)
             {
                 curHeight -= curFallSpeed * Time.deltaTime;
                 transform.position = new Vector3(origPos.x, curHeight, origPos.z);
             }
-            else if (foot.TrigGround || curHeight <= origY + 0.05f)
+            else if (foot.TrigGround || !isBeDropped && curHeight <= origY + 0.05f)
             {
                 if (!isBeDropped)
                 {