From f93fe8a81e1e453c79aece640a4e6430b662b74d Mon Sep 17 00:00:00 2001 From: swrring Date: Wed, 4 Nov 2026 04:31:52 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B9=B4=EB=A9=94=EB=9D=BC=20=EA=B3=A0?= =?UTF-8?q?=EC=A0=95=20=EB=B2=94=EC=9C=84=EC=97=90=20HUD=20=EC=97=AC?= =?UTF-8?q?=EC=9C=A0(=EC=9C=84=202.6=20=C2=B7=20=EC=95=84=EB=9E=98=202.2)?= =?UTF-8?q?=20=E2=80=94=20=EC=A0=84=EC=9E=A5=20=EB=81=9D=20=EC=8A=A4?= =?UTF-8?q?=ED=81=AC=EB=A1=A4=20=EC=8B=9C=20=EC=9C=A0=EB=8B=9B=EC=9D=B4=20?= =?UTF-8?q?=EC=83=81=EB=8B=A8=20HUD=20=EB=B0=91=EC=97=90=20=EA=B9=94?= =?UTF-8?q?=EB=A6=AC=EB=8D=98=20=EA=B2=83=20=EC=88=98=EC=A0=95=20=C2=B7=20?= =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8=2014/14?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5.1 --- Assets/Scripts/Runtime/CameraController.cs | 8 ++++++-- Assets/Tests/PlayMode/BattleFlowTests.cs | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Runtime/CameraController.cs b/Assets/Scripts/Runtime/CameraController.cs index acde62b4..e2e0a8d3 100644 --- a/Assets/Scripts/Runtime/CameraController.cs +++ b/Assets/Scripts/Runtime/CameraController.cs @@ -12,6 +12,10 @@ namespace TKS public float MinViewHeight = 10f; public float MaxViewHeight = 36f; public float Margin = 1f; + [Tooltip("위쪽 HUD(스테이지·턴 글자) 밑에 유닛이 깔리지 않도록 전장 위 끝을 더 내려 볼 수 있는 여유")] + public float TopMargin = 2.6f; + [Tooltip("아래쪽 HUD(안내·유닛 정보) 여유")] + public float BottomMargin = 2.2f; public float FollowSpeed = 7f; Camera cam; @@ -127,8 +131,8 @@ namespace TKS var r = Board.Rect; float minX = r.xMin - Margin + halfW; float maxX = r.xMax + Margin - halfW; - float minY = r.yMin - Margin + halfH; - float maxY = r.yMax + Margin - halfH; + float minY = r.yMin - BottomMargin + halfH; + float maxY = r.yMax + TopMargin - halfH; p.x = minX > maxX ? 0f : Mathf.Clamp(p.x, minX, maxX); p.y = minY > maxY ? 0f : Mathf.Clamp(p.y, minY, maxY); return p; diff --git a/Assets/Tests/PlayMode/BattleFlowTests.cs b/Assets/Tests/PlayMode/BattleFlowTests.cs index 67485f90..c7aa52d8 100644 --- a/Assets/Tests/PlayMode/BattleFlowTests.cs +++ b/Assets/Tests/PlayMode/BattleFlowTests.cs @@ -243,7 +243,7 @@ namespace TKS.Tests var r = bm.Board.Rect; cc.SnapTo(new Vector2(1000f, 1000f)); var v = cc.ViewRect; - Assert.LessOrEqual(v.yMax, r.yMax + cc.Margin + 0.01f, "전장 위쪽 밖으로 못 나감"); + Assert.LessOrEqual(v.yMax, r.yMax + cc.TopMargin + 0.01f, "전장 위쪽 밖으로 못 나감(HUD 여유만큼만)"); Assert.LessOrEqual(v.xMax, r.xMax + cc.Margin + 0.01f + Mathf.Max(0f, v.width - r.width), "전장 오른쪽 밖으로 못 나감"); cc.SnapTo(Vector2.zero); cc.PanBy(new Vector2(0f, 2f));