showdialog対応

This commit is contained in:
kimura 2021-11-30 18:16:28 +09:00
parent 80f61b3110
commit 92eda917ca
2 changed files with 5 additions and 6 deletions

View File

@ -54,8 +54,7 @@ public class KitchenManager : MonoBehaviour
gameData.CornSeed = 90; gameData.CornSeed = 90;
gameData.Coin = 10; gameData.Coin = 10;
// 店舗レベル1達成表示 // 店舗レベル1達成表示
LocalCacheManager.Save(ShopLevelUp.DataTag, 1); ShopLevelUp.ShowDialog(1, () =>
LocalCacheManager.Save(ShopLevelUp.CallbackTag, new Action(() =>
{ {
TutorialManager.Instance.ShowTutorialConversation(1, () => TutorialManager.Instance.ShowTutorialConversation(1, () =>
{ {

View File

@ -9,8 +9,8 @@ using UnityEngine.UI;
public class ShopLevelUp : MonoBehaviour public class ShopLevelUp : MonoBehaviour
{ {
public static readonly string DataTag = "ShopLevelUpData"; private static readonly string DataTag = "ShopLevelUpData";
public static readonly string CallbackTag = "ShopLevelUpCallback"; private static readonly string CallbackTag = "ShopLevelUpCallback";
private static readonly int OpenTrigger = Animator.StringToHash("OpenTrigger"); private static readonly int OpenTrigger = Animator.StringToHash("OpenTrigger");
private static readonly int CloseTrigger = Animator.StringToHash("CloseTrigger"); private static readonly int CloseTrigger = Animator.StringToHash("CloseTrigger");
@ -58,8 +58,8 @@ public class ShopLevelUp : MonoBehaviour
var productList = SpreadsheetDataManager.Instance.GetBaseDataList<ProductData>(Const.ProductDataSheet); var productList = SpreadsheetDataManager.Instance.GetBaseDataList<ProductData>(Const.ProductDataSheet);
var shopLevelList = SpreadsheetDataManager.Instance.GetBaseDataList<ShopLevelData>(Const.ShopLevelDataSheet); var shopLevelList = SpreadsheetDataManager.Instance.GetBaseDataList<ShopLevelData>(Const.ShopLevelDataSheet);
shopLevelText.text = shopLevel.ToString(); shopLevelText.text = shopLevel.ToString();
achievementText.text = shopLevelList.First(data => data.shopLevel == shopLevel).achievement; achievementText.text = shopLevelList.FirstOrDefault(data => data.shopLevel == shopLevel)?.achievement ?? "";
recipeNameText.text = productList.First(data => data.shopLevel == shopLevel).name; recipeNameText.text = productList.FirstOrDefault(data => data.shopLevel == shopLevel)?.name ?? "";
summaryObject.SetActive(false); summaryObject.SetActive(false);
this.CallWaitForSeconds(1f, () => this.CallWaitForSeconds(1f, () =>