Merge branch 'develop' of http://gitea.capers.co.kr:3000/iwnc2020/ProjectDDD into develop
This commit is contained in:
commit
16831a8231
3
.gitignore
vendored
3
.gitignore
vendored
@ -97,3 +97,6 @@ packages-lock.json
|
||||
# Unity SpriteAtlas auto-generated files
|
||||
Assets/_DDD/_Addressables/Sprites/*
|
||||
.autosave/
|
||||
|
||||
Assets/AddressableAssetsData/AssetGroups/Group.asset
|
||||
Assets/AddressableAssetsData/AssetGroups/*Group.asset
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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<FoodDataSo>().GetDataById(GetRecipeResultKey).CookwareKey;
|
||||
break;
|
||||
case RecipeType.DrinkRecipe:
|
||||
cookwareSpriteKey = DataManager.Instance.GetDataSo<DrinkDataSo>().GetDataById(GetRecipeResultKey).CookwareKey;
|
||||
break;
|
||||
}
|
||||
return DataManager.Instance.GetSprite(cookwareSpriteKey);
|
||||
}
|
||||
}
|
||||
|
||||
public string GetRecipeResultKey
|
||||
{
|
||||
get
|
||||
@ -76,6 +55,27 @@ public string GetRecipeResultKey
|
||||
return DataManager.Instance.GetDataSo<RecipeDataSo>().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<FoodDataSo>().GetDataById(resultKey).CookwareKey;
|
||||
}
|
||||
else if (RecipeType == RecipeType.DrinkRecipe)
|
||||
{
|
||||
cookwareKey = DataManager.Instance.GetDataSo<DrinkDataSo>().GetDataById(resultKey).CookwareKey;
|
||||
}
|
||||
return DataManager.Instance.GetIcon(cookwareKey);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public List<TasteData> GetTasteDatas
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user