| | |
| | | StoreModel storeModel { get { return ModelCenter.Instance.GetModel<StoreModel>(); } }
|
| | | FlashSaleModel model { get { return ModelCenter.Instance.GetModel<FlashSaleModel>(); } }
|
| | |
|
| | | public void Display(int index, int _id)
|
| | | public void Display(OperationFlashSale.FlashSaleGift gift)
|
| | | {
|
| | | m_BuyButton.RemoveAllListeners();
|
| | | OperationBase operationBase;
|
| | | if (OperationTimeHepler.Instance.TryGetOperationTime(Operation.FlashSale, out operationBase))
|
| | | {
|
| | | OperationFlashSale operation = operationBase as OperationFlashSale;
|
| | | var gift = operation.GetFlashSaleGift(index, _id);
|
| | | if (!gift.Equals(default(OperationFlashSale.FlashSaleGift)))
|
| | | {
|
| | | m_OriginalCostIcon.SetIconWithMoneyType(gift.moneyType);
|
| | |
| | | m_BuyButton.gameObject.SetActive(buyCount < gift.limitNum);
|
| | | m_BuyButton.AddListener(() =>
|
| | | {
|
| | | model.SendBuyFlashSale(index, _id);
|
| | | model.SendBuyFlashSale(gift);
|
| | | });
|
| | | }
|
| | | }
|