From ecfc88bdebc06fb1065928ed88c51f9d4c3207eb Mon Sep 17 00:00:00 2001 From: kimura Date: Fri, 12 Nov 2021 11:22:39 +0900 Subject: [PATCH] =?UTF-8?q?=E3=81=8A=E5=AE=A2=E3=81=95=E3=82=93=E3=81=8C?= =?UTF-8?q?=E3=83=9D=E3=83=83=E3=83=97=E3=82=B3=E3=83=BC=E3=83=B3=E8=B3=BC?= =?UTF-8?q?=E5=85=A5=E5=BE=8C=E3=80=81=E6=AD=A3=E3=81=97=E3=81=8F=E7=A8=AE?= =?UTF-8?q?=E9=A1=9E=E3=81=8C=E8=A8=AD=E5=AE=9A=E3=81=95=E3=82=8C=E3=81=B0?= =?UTF-8?q?=E3=81=84=E5=A0=B4=E5=90=88=E3=82=92=E8=A7=A3=E6=B1=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MyGame/Scenes/marketing/Scripts/CustomerAnimator.cs | 4 ++++ .../Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerAnimator.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerAnimator.cs index d70db6d6..697a24f0 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerAnimator.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerAnimator.cs @@ -93,6 +93,10 @@ public class CustomerAnimator : MonoBehaviour Instantiate(prefab, rightPopcornTarget).ChangeRarity(rarity); Instantiate(prefab, frontPopcornTarget).ChangeRarity(rarity); Instantiate(prefab, wantFlavorSpriteTarget).ChangeRarity(rarity); + } + + public void ShowWantFlavor() + { orderPopup.SetActive(true); } diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs index 7ed977d2..345c2d21 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs @@ -291,6 +291,11 @@ public class MarketManager : MonoBehaviour { customerAnimator.SetSide(x); }).AddTo(customerAnimator); + // フレーバー設定 + if (productDataList.FirstOrDefault(data => data.id == (controller.WantFlavor.Value?.FlavorId ?? -1))?.GetMarketPrefab() is MarketPopcornView initialPrefab) + { + customerAnimator.SetWantFlavor(initialPrefab, controller.WantFlavor.Value.Rarity); + } controller.WantFlavor .SkipLatestValueOnSubscribe() .Subscribe(wantData => @@ -298,6 +303,7 @@ public class MarketManager : MonoBehaviour if (productDataList.FirstOrDefault(data => data.id == wantData.FlavorId)?.GetMarketPrefab() is MarketPopcornView prefab) { customerAnimator.SetWantFlavor(prefab, wantData.Rarity); + customerAnimator.ShowWantFlavor(); } }).AddTo(customerAnimator); controller.IsComplain