コード例 #1
0
 void IncreaseAmount(string itemId, int currentAmount)
 {
     if (ItemId == itemId)
     {
         Amount++;
         ItemPresenter.SetAmount(Amount);
     }
 }
コード例 #2
0
 public void DecreaseAmount(int amount)
 {
     Amount -= amount;
     if (Amount > 0)
     {
         ItemPresenter.SetAmount(Amount);
     }
     else
     {
         RemoveItem();
     }
 }