示例#1
0
 public Item SetStack(int amount)
 {
     StackCount = Math.Max(1, Math.Min(amount, StackCountMax));
     StackCountChanged?.Invoke();
     return(this);
 }
示例#2
0
 public Item RemoveStack(int amount = 1)
 {
     StackCount = Math.Max(StackCount - amount, 0);
     StackCountChanged?.Invoke();
     return(this);
 }