diff --git a/popcorn/Assets/MyGame/Scenes/Main/Scripts/KitchenManager.cs b/popcorn/Assets/MyGame/Scenes/Main/Scripts/KitchenManager.cs index 2ae71741..bb2058d7 100644 --- a/popcorn/Assets/MyGame/Scenes/Main/Scripts/KitchenManager.cs +++ b/popcorn/Assets/MyGame/Scenes/Main/Scripts/KitchenManager.cs @@ -31,7 +31,7 @@ public class KitchenManager : MonoBehaviour { RecipeSelectDialog.ShowDialog(ProductViewType.Default, () => { - if (gameData.isFirstPlay) + if (gameData.isFirstPlay && TutorialManager.Instance.Index == 1) { var go = FindObjectOfType().transform; go.transform.FindChildByName("Button_field", t => @@ -48,13 +48,32 @@ public class KitchenManager : MonoBehaviour #endif if (gameData.isFirstPlay) { - gameData.CornSeed = 90; - gameData.Coin = 10; - // 店舗レベル1達成表示 - LocalCacheManager.Save(ShopLevelUp.DataTag, 1); - LocalCacheManager.Save(ShopLevelUp.CallbackTag, new Action(() => + if (TutorialManager.Instance.Index == 1) { - TutorialManager.Instance.ShowTutorialConversation(1, () => + gameData.CornSeed = 90; + gameData.Coin = 10; + // 店舗レベル1達成表示 + LocalCacheManager.Save(ShopLevelUp.DataTag, 1); + LocalCacheManager.Save(ShopLevelUp.CallbackTag, new Action(() => + { + TutorialManager.Instance.ShowTutorialConversation(1, () => + { + // マスク表示 + var buttonRectTransform = cookingButton.transform as RectTransform; + var go = TutorialManager.Instance.ShowTutorialMask(buttonRectTransform.parent, buttonRectTransform); + cookingButton.OnClickAsObservable().Take(1).Subscribe(_ => + { + DestroyImmediate(go); + }).AddTo(this); + }); + })); + TransitionManager.Instance.LoadSceneAdditive(GameScenes.StoreLevel); + } + else if (TutorialManager.Instance.Index == 6) + { + gameData.CornSeed = 150; + gameData.Material.First(m => m.Id == 2).Amount = 1; + TutorialManager.Instance.ShowTutorialConversation(7, () => { // マスク表示 var buttonRectTransform = cookingButton.transform as RectTransform; @@ -64,8 +83,7 @@ public class KitchenManager : MonoBehaviour DestroyImmediate(go); }).AddTo(this); }); - })); - TransitionManager.Instance.LoadSceneAdditive(GameScenes.StoreLevel); + } } CoinManager.Instance.ChangeCoin(gameData.Coin); diff --git a/popcorn/Assets/MyGame/Scenes/recipe/RecipeChoice.unity b/popcorn/Assets/MyGame/Scenes/recipe/RecipeChoice.unity index a59e7623..a1fd468b 100644 --- a/popcorn/Assets/MyGame/Scenes/recipe/RecipeChoice.unity +++ b/popcorn/Assets/MyGame/Scenes/recipe/RecipeChoice.unity @@ -985,7 +985,7 @@ Canvas: m_SortingBucketNormalizedSize: 0 m_AdditionalShaderChannelsFlag: 25 m_SortingLayerID: 0 - m_SortingOrder: 200 + m_SortingOrder: 201 m_TargetDisplay: 0 --- !u!224 &679566765 RectTransform: diff --git a/popcorn/Assets/MyGame/Scenes/recipe/Scripts/RecipeDetailView.cs b/popcorn/Assets/MyGame/Scenes/recipe/Scripts/RecipeDetailView.cs index 864c3d73..44a54ce6 100644 --- a/popcorn/Assets/MyGame/Scenes/recipe/Scripts/RecipeDetailView.cs +++ b/popcorn/Assets/MyGame/Scenes/recipe/Scripts/RecipeDetailView.cs @@ -45,12 +45,24 @@ public class RecipeDetailView : MonoBehaviour if (gameData.isFirstPlay) { - TutorialManager.Instance.ShowTutorialConversation(2, () => + if (TutorialManager.Instance.Index == 1) { - LocalCacheManager.Load(CallbackTag, null)?.Invoke(); - TransitionManager.Instance.UnloadScene(GameScenes.RecipeChoice); - TransitionManager.Instance.UnloadScene(GameScenes.Recipe); - }); + TutorialManager.Instance.ShowTutorialConversation(2, () => + { + LocalCacheManager.Load(CallbackTag, null)?.Invoke(); + TransitionManager.Instance.UnloadScene(GameScenes.RecipeChoice); + TransitionManager.Instance.UnloadScene(GameScenes.Recipe); + }); + } + else if (TutorialManager.Instance.Index == 7) + { + // マスク表示 + var go = TutorialManager.Instance.ShowTutorialMask(transform.parent.parent, nextButton.transform as RectTransform); + nextButton.OnClickAsObservable().Take(1).Subscribe(_ => + { + DestroyImmediate(go); + }).AddTo(this); + } } cancelButton.OnClickAsObservable().Subscribe(_ =>