ノーマル時リザルト表示修正/ commit漏れ追加
This commit is contained in:
parent
5a5fc3cc75
commit
4202f24fad
|
|
@ -35,7 +35,7 @@ public class CookingResult : MonoBehaviour
|
|||
SetData(productData, rarityData);
|
||||
result.Subscribe(r =>
|
||||
{
|
||||
SetUI(r);
|
||||
SetUI(r, rarityData.Rarity != ProductRarity.Normal);
|
||||
if (r != CornResult.Failure)
|
||||
{
|
||||
successAction?.Invoke();
|
||||
|
|
@ -77,7 +77,7 @@ public class CookingResult : MonoBehaviour
|
|||
rarityView.SetRarity(rarity.Rarity);
|
||||
}
|
||||
|
||||
private void SetUI(CornResult result)
|
||||
private void SetUI(CornResult result, bool hasRarity)
|
||||
{
|
||||
centerOkButton.gameObject.SetActive(false);
|
||||
perfectButton.gameObject.SetActive(false);
|
||||
|
|
@ -101,7 +101,11 @@ public class CookingResult : MonoBehaviour
|
|||
|
||||
detailObject.SetActive(result != CornResult.Failure);
|
||||
explainObject.SetActive(result == CornResult.Good);
|
||||
explainWithRarityObject.SetActive(result == CornResult.Perfect);
|
||||
if (result == CornResult.Perfect)
|
||||
{
|
||||
explainWithRarityObject.SetActive(hasRarity);
|
||||
explainObject.SetActive(!hasRarity);
|
||||
}
|
||||
}
|
||||
|
||||
private void AddStock(ProductData productData, ProductRarity rarity = ProductRarity.Normal)
|
||||
|
|
@ -111,7 +115,11 @@ public class CookingResult : MonoBehaviour
|
|||
var remain = productData.volume;
|
||||
var shopSpace = Market.ShopStockCount - gameData.ShopStock.Count;
|
||||
var stockCount = Mathf.Min(shopSpace, remain);
|
||||
gameData.ShopStock.AddRange(Enumerable.Repeat(productData.id, stockCount));
|
||||
gameData.ShopStock.AddRange(Enumerable.Repeat(new ProductStockData
|
||||
{
|
||||
FlavorId = productData.id,
|
||||
Rarity = rarity,
|
||||
}, stockCount));
|
||||
remain -= stockCount;
|
||||
|
||||
// 空タンク並び替え
|
||||
|
|
|
|||
Loading…
Reference in New Issue