From 760325d2bb489130d78640ba8870aa55b8b302ea Mon Sep 17 00:00:00 2001 From: NTG_Lenovo Date: Wed, 6 Aug 2025 16:06:19 +0900 Subject: [PATCH] =?UTF-8?q?ui=20=EC=83=81=EC=84=B8=20=EC=84=A4=EB=AA=85?= =?UTF-8?q?=EB=9E=80=EC=97=90=20=EC=9A=94=EB=A6=AC=EB=8F=84=EA=B5=AC=20?= =?UTF-8?q?=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RestaurantManagementUi/ItemDetailView.cs | 2 +- .../ItemUi/ItemViewModel.cs | 42 +++++++++---------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Assets/_DDD/_Scripts/GameUi/RestaurantManagementUi/ItemDetailView.cs b/Assets/_DDD/_Scripts/GameUi/RestaurantManagementUi/ItemDetailView.cs index 5b96ae205..434281a84 100644 --- a/Assets/_DDD/_Scripts/GameUi/RestaurantManagementUi/ItemDetailView.cs +++ b/Assets/_DDD/_Scripts/GameUi/RestaurantManagementUi/ItemDetailView.cs @@ -77,7 +77,7 @@ public async void Show(ItemViewModel model) } _labelLocalizer.StringReference = LocalizationManager.Instance.GetLocalizedName(viewItemKey); _descriptionLocalizer.StringReference = LocalizationManager.Instance.GetLocalizedDescription(viewItemKey); - _cookwareImage.sprite = _currentItemViewModel.GetCookwareSprite; + _cookwareImage.sprite = _currentItemViewModel.GetCookwareIcon; UpdateTasteHashTags(_currentItemViewModel); } diff --git a/Assets/_DDD/_Scripts/GameUi/RestaurantManagementUi/ItemUi/ItemViewModel.cs b/Assets/_DDD/_Scripts/GameUi/RestaurantManagementUi/ItemUi/ItemViewModel.cs index b5b4938f0..247fa016a 100644 --- a/Assets/_DDD/_Scripts/GameUi/RestaurantManagementUi/ItemUi/ItemViewModel.cs +++ b/Assets/_DDD/_Scripts/GameUi/RestaurantManagementUi/ItemUi/ItemViewModel.cs @@ -46,27 +46,6 @@ public Sprite ItemSprite return DataManager.Instance.GetSprite(Id); } } - - public Sprite GetCookwareSprite - { - get - { - if (ItemType != ItemType.Recipe) return null; - - string cookwareSpriteKey = null; - switch (RecipeType) - { - case RecipeType.FoodRecipe: - cookwareSpriteKey = DataManager.Instance.GetDataSo().GetDataById(GetRecipeResultKey).CookwareKey; - break; - case RecipeType.DrinkRecipe: - cookwareSpriteKey = DataManager.Instance.GetDataSo().GetDataById(GetRecipeResultKey).CookwareKey; - break; - } - return DataManager.Instance.GetSprite(cookwareSpriteKey); - } - } - public string GetRecipeResultKey { get @@ -76,6 +55,27 @@ public string GetRecipeResultKey return DataManager.Instance.GetDataSo().GetDataById(Id).RecipeResult; } } + + public Sprite GetCookwareIcon + { + get + { + var resultKey = GetRecipeResultKey; + if (resultKey == null) return null; + + string cookwareKey = null; + if (RecipeType == RecipeType.FoodRecipe) + { + cookwareKey = DataManager.Instance.GetDataSo().GetDataById(resultKey).CookwareKey; + } + else if (RecipeType == RecipeType.DrinkRecipe) + { + cookwareKey = DataManager.Instance.GetDataSo().GetDataById(resultKey).CookwareKey; + } + return DataManager.Instance.GetIcon(cookwareKey); + } + } + public List GetTasteDatas {