解放済みレシピをMyRecipeに保存
This commit is contained in:
parent
a3c04c97d6
commit
28f4dc8772
|
|
@ -28,7 +28,18 @@ public class RecipeSelectDialog : MonoBehaviour
|
||||||
var view = Instantiate(recipePrefab, content.transform);
|
var view = Instantiate(recipePrefab, content.transform);
|
||||||
view.SetRecipe(productData);
|
view.SetRecipe(productData);
|
||||||
// 所持レシピ確認
|
// 所持レシピ確認
|
||||||
if (gameData.MyRecipes.Contains(productData.id) || productData.shopLevel <= HeartMeter.Instance.ShopLevel.Value)
|
var hasRecipe = false;
|
||||||
|
if (gameData.MyRecipes.Contains(productData.id))
|
||||||
|
{
|
||||||
|
hasRecipe = true;
|
||||||
|
}
|
||||||
|
else if (productData.shopLevel <= HeartMeter.Instance.ShopLevel.Value)
|
||||||
|
{
|
||||||
|
// レシピ開放
|
||||||
|
gameData.MyRecipes = new List<int>(gameData.MyRecipes){productData.id}.ToArray();
|
||||||
|
hasRecipe = true;
|
||||||
|
}
|
||||||
|
if (hasRecipe)
|
||||||
{
|
{
|
||||||
view.SetLockPanel(false);
|
view.SetLockPanel(false);
|
||||||
view.RecipeClickObservable.Subscribe(_ =>
|
view.RecipeClickObservable.Subscribe(_ =>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue