大量注文時、タンクの空きチェックを回避

This commit is contained in:
kimura 2021-10-11 19:24:42 +09:00
parent cbcb4ac030
commit 8e1b044c95
1 changed files with 18 additions and 4 deletions

View File

@ -68,10 +68,24 @@ public class RecipeDetailView : MonoBehaviour
SetRecipe(data, viewType); SetRecipe(data, viewType);
var isPassedAmount = CheckAmount(data); var isPassedAmount = CheckAmount(data);
var isPassedTank = CheckTank(data); var isPassedTank = CheckTank(data);
switch (viewType)
{
case ProductViewType.Default:
nextButton.interactable = isPassedAmount && isPassedTank; nextButton.interactable = isPassedAmount && isPassedTank;
panSelector.gameObject.SetActive(!isPassedAmount || isPassedTank); panSelector.gameObject.SetActive(!isPassedAmount || isPassedTank);
disabledNextButton.SetActive(!isPassedAmount || !isPassedTank); disabledNextButton.SetActive(!isPassedAmount || !isPassedTank);
tankCaution.SetActive(isPassedAmount && !isPassedTank); tankCaution.SetActive(isPassedAmount && !isPassedTank);
break;
case ProductViewType.BulkOrder:
nextButton.interactable = isPassedAmount;
panSelector.gameObject.SetActive(true);
disabledNextButton.SetActive(!nextButton.interactable);
tankCaution.SetActive(false);
break;
default:
throw new ArgumentOutOfRangeException();
}
} }
public void SetRecipe(ProductData data, ProductViewType viewType) public void SetRecipe(ProductData data, ProductViewType viewType)