SHA256
Translate Codebase Comments and Log Messages to English
This commit is contained in:
23 files changed
+915
-921
No files matched your search
+17
-18
@@ -14,15 +14,15 @@ internal class EscapeHandlerUI : MonoBehaviour
|
||||
|
||||
private void Start()
|
||||
{
|
||||
// UI 레이어(5) 설정
|
||||
// Set UI layer (5)
|
||||
gameObject.layer = 5;
|
||||
|
||||
// Canvas 설정
|
||||
// Canvas setup
|
||||
var canvas = gameObject.AddComponent<Canvas>();
|
||||
canvas.renderMode = RenderMode.ScreenSpaceOverlay;
|
||||
canvas.sortingOrder = 10000; // 디버그 모니터보다 위에 오도록 설정
|
||||
canvas.sortingOrder = 10000; // Placed above debug monitor
|
||||
|
||||
// 해상도 대응 캔버스 스케일러 설정
|
||||
// Responsive Canvas Scaler setup
|
||||
var scaler = gameObject.AddComponent<CanvasScaler>();
|
||||
scaler.uiScaleMode = CanvasScaler.ScaleMode.ScaleWithScreenSize;
|
||||
scaler.referenceResolution = new Vector2(1920, 1080);
|
||||
@@ -31,23 +31,22 @@ internal class EscapeHandlerUI : MonoBehaviour
|
||||
|
||||
gameObject.AddComponent<GraphicRaycaster>();
|
||||
|
||||
// 1. 컨테이너 및 배경 패널 오브젝트 생성
|
||||
// 1. Create container and background panel object
|
||||
_containerObj = new GameObject("EscapeContainer");
|
||||
_containerObj.transform.SetParent(transform, false);
|
||||
_containerObj.layer = 5;
|
||||
|
||||
var bgImage = _containerObj.AddComponent<Image>();
|
||||
// 고급스러운 다크톤 아크릴 감성
|
||||
bgImage.color = new Color(0.05f, 0.05f, 0.07f, 0.85f);
|
||||
bgImage.color = new Color(0.05f, 0.05f, 0.07f, 0.85f); // Dark tone acrylic style
|
||||
|
||||
var containerRect = _containerObj.GetComponent<RectTransform>();
|
||||
containerRect.anchorMin = new Vector2(0.5f, 0.5f);
|
||||
containerRect.anchorMax = new Vector2(0.5f, 0.5f);
|
||||
containerRect.pivot = new Vector2(0.5f, 0.5f);
|
||||
containerRect.anchoredPosition = Vector2.zero; // 화면 중앙
|
||||
containerRect.anchoredPosition = Vector2.zero; // Screen center
|
||||
containerRect.sizeDelta = new Vector2(460, 160);
|
||||
|
||||
// 2. 텍스트 오브젝트 생성
|
||||
// 2. Create text object
|
||||
var textObj = new GameObject("EscapeText");
|
||||
textObj.transform.SetParent(_containerObj.transform, false);
|
||||
textObj.layer = 5;
|
||||
@@ -58,7 +57,7 @@ internal class EscapeHandlerUI : MonoBehaviour
|
||||
_textComponent.textWrappingMode = TextWrappingModes.NoWrap;
|
||||
_textComponent.richText = true;
|
||||
|
||||
// 게임의 기본 폰트 적용 (RDString.fontData.fontTMP)
|
||||
// Apply game's default font (RDString.fontData.fontTMP)
|
||||
if (RDString.fontData.fontTMP != null)
|
||||
_textComponent.font = RDString.fontData.fontTMP;
|
||||
|
||||
@@ -68,13 +67,13 @@ internal class EscapeHandlerUI : MonoBehaviour
|
||||
textRect.offsetMin = new Vector2(10, 10);
|
||||
textRect.offsetMax = new Vector2(-10, -10);
|
||||
|
||||
// 초기 상태는 비활성화
|
||||
// Initial state disabled
|
||||
_containerObj.SetActive(false);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
// 렌더링이 더 이상 활성화되어 있지 않으면 자가 파괴
|
||||
// Destroy self if rendering is no longer active
|
||||
if (!RenderManager.IsActive)
|
||||
{
|
||||
Destroy(gameObject);
|
||||
@@ -93,10 +92,10 @@ internal class EscapeHandlerUI : MonoBehaviour
|
||||
var elapsed = (float)_escapeStopwatch.Elapsed.TotalSeconds;
|
||||
var remaining = Mathf.Max(0f, 3f - elapsed);
|
||||
|
||||
// 남은 시간 텍스트 업데이트
|
||||
_textComponent.text = $"<color=#FF5252>탈출까지 {remaining:F1}초..</color>\n<size=40><color=#DDDDDD>Esc 키를 계속 누르고 계세요</color></size>";
|
||||
// Update remaining time text
|
||||
_textComponent.text = $"<color=#FF5252>Cancelling in {remaining:F1}s..</color>\n<size=40><color=#DDDDDD>Hold Esc to cancel render</color></size>";
|
||||
|
||||
// 마이크로 펄스 애니메이션 적용 (누르는 동안 컨테이너 전체 크기가 부드럽게 커짐)
|
||||
// Micro pulse animation (container smoothly scales up while holding)
|
||||
var scale = 1.0f + elapsed / 3.0f * 0.15f;
|
||||
_containerObj.transform.localScale = new Vector3(scale, scale, 1f);
|
||||
|
||||
@@ -104,10 +103,10 @@ internal class EscapeHandlerUI : MonoBehaviour
|
||||
|
||||
_escapeStopwatch.Stop();
|
||||
_escapeStopwatch = null;
|
||||
_containerObj.transform.localScale = Vector3.one; // 스케일 초기화
|
||||
_containerObj.transform.localScale = Vector3.one; // Reset scale
|
||||
_containerObj.SetActive(false);
|
||||
|
||||
// 렌더링 취소 및 씬 이탈
|
||||
// Cancel rendering and exit scene
|
||||
if (RenderManager.Instance)
|
||||
RenderManager.Instance.CancelRender();
|
||||
}
|
||||
@@ -116,7 +115,7 @@ internal class EscapeHandlerUI : MonoBehaviour
|
||||
if (_escapeStopwatch == null) return;
|
||||
_escapeStopwatch.Stop();
|
||||
_escapeStopwatch = null;
|
||||
_containerObj.transform.localScale = Vector3.one; // 스케일 초기화
|
||||
_containerObj.transform.localScale = Vector3.one; // Reset scale
|
||||
_containerObj.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user