| | |
| | | public readonly LogicInt wannaBuyCount = new LogicInt(); |
| | | |
| | | StoreModel model { get { return ModelCenter.Instance.GetModel<StoreModel>(); } } |
| | | BuyShopItemLimit goodLimit; |
| | | |
| | | public void SetGood(int goodId) |
| | | { |
| | | this.goodId = goodId; |
| | | wannaBuyCount.value = 1; |
| | | goodLimit = model.GetBuyShopLimit((uint)goodId); |
| | | } |
| | | |
| | | public void SetBuyCount(int count) |
| | |
| | | canBuy = config.PurchaseNumber[0]; |
| | | } |
| | | |
| | | var goodLimit = model.GetBuyShopLimit((uint)goodId); |
| | | var haveBuy = goodLimit != null ? goodLimit.BuyCnt : 0; |
| | | return canBuy - haveBuy; |
| | | } |