Kaynağa Gözat

摔落伤害

SZAND\msx_2 1 yıl önce
ebeveyn
işleme
7e0532fc9a

+ 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)
                 {