menu 개발 중. 언어 변경 시 반영 않됨

This commit is contained in:
logonkhi
2025-06-11 19:24:08 +09:00
parent cd8c5e177b
commit 2614470f13
92 changed files with 1199947 additions and 188 deletions

View File

@@ -0,0 +1,7 @@
namespace UVC.UI.Commands
{
public interface ICommand
{
void Execute();
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 9f0eef464dda89d4b9f20e533843b83f

View File

@@ -0,0 +1,62 @@
using System;
using UnityEngine;
using UVC.Locale;
using UVC.Log;
namespace UVC.UI.Commands
{
// 간단한 디버그 로그 출력 커맨드
public class DebugLogCommand : ICommand
{
private readonly string _message;
public DebugLogCommand(string message)
{
_message = message;
}
public void Execute()
{
ULog.Debug(_message);
}
}
// 애플리케이션 종료 커맨드
public class QuitApplicationCommand : ICommand
{
public void Execute()
{
ULog.Debug("애플리케이션을 종료합니다.");
Application.Quit();
#if UNITY_EDITOR
UnityEditor.EditorApplication.isPlaying = false; // 에디터에서 실행 중일 경우 플레이 모드 종료
#endif
}
}
// 언어 변경 커맨드
public class ChangeLanguageCommand : ICommand
{
private readonly string _languageCode;
private readonly LocalizationManager _localizationManager;
public ChangeLanguageCommand(string languageCode, LocalizationManager localizationManager)
{
_languageCode = languageCode;
_localizationManager = localizationManager;
}
public void Execute()
{
if (_localizationManager != null)
{
_localizationManager.SetCurrentLanguage(_languageCode);
ULog.Debug($"언어가 {_languageCode}(으)로 변경되었습니다. (Command)");
}
else
{
ULog.Error("LocalizationManager가 ChangeLanguageCommand에 전달되지 않았습니다.");
}
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: c05439dd4537f6245a5cb70f56d372c7