お客さんがポップコーン購入後、正しく種類が設定さればい場合を解決
This commit is contained in:
parent
2969c2d950
commit
ecfc88bdeb
|
|
@ -93,6 +93,10 @@ public class CustomerAnimator : MonoBehaviour
|
||||||
Instantiate(prefab, rightPopcornTarget).ChangeRarity(rarity);
|
Instantiate(prefab, rightPopcornTarget).ChangeRarity(rarity);
|
||||||
Instantiate(prefab, frontPopcornTarget).ChangeRarity(rarity);
|
Instantiate(prefab, frontPopcornTarget).ChangeRarity(rarity);
|
||||||
Instantiate(prefab, wantFlavorSpriteTarget).ChangeRarity(rarity);
|
Instantiate(prefab, wantFlavorSpriteTarget).ChangeRarity(rarity);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ShowWantFlavor()
|
||||||
|
{
|
||||||
orderPopup.SetActive(true);
|
orderPopup.SetActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -291,6 +291,11 @@ public class MarketManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
customerAnimator.SetSide(x);
|
customerAnimator.SetSide(x);
|
||||||
}).AddTo(customerAnimator);
|
}).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
|
controller.WantFlavor
|
||||||
.SkipLatestValueOnSubscribe()
|
.SkipLatestValueOnSubscribe()
|
||||||
.Subscribe(wantData =>
|
.Subscribe(wantData =>
|
||||||
|
|
@ -298,6 +303,7 @@ public class MarketManager : MonoBehaviour
|
||||||
if (productDataList.FirstOrDefault(data => data.id == wantData.FlavorId)?.GetMarketPrefab() is MarketPopcornView prefab)
|
if (productDataList.FirstOrDefault(data => data.id == wantData.FlavorId)?.GetMarketPrefab() is MarketPopcornView prefab)
|
||||||
{
|
{
|
||||||
customerAnimator.SetWantFlavor(prefab, wantData.Rarity);
|
customerAnimator.SetWantFlavor(prefab, wantData.Rarity);
|
||||||
|
customerAnimator.ShowWantFlavor();
|
||||||
}
|
}
|
||||||
}).AddTo(customerAnimator);
|
}).AddTo(customerAnimator);
|
||||||
controller.IsComplain
|
controller.IsComplain
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue