| | |
| | | m_ParticipateImage.SetActive(false);
|
| | | m_HighestPriceImage.SetActive(false);
|
| | | m_EquipmentScoreObj.SetActive(false);
|
| | | m_OverTime.gameObject.SetActive(false);
|
| | | var indexList = model.FullServiceAuctionList.FindIndex((x) => { return x.ItemGUID == GUID; });
|
| | | if (indexList == -1 && !model.BiddingItemInfoDic.ContainsKey(GUID))
|
| | | {
|
| | |
| | | {
|
| | | m_HighestPriceImage.SetActive(true);
|
| | | }
|
| | | |
| | |
|
| | | }
|
| | | if (fullServiceAuction.BidderPrice != 0)
|
| | | {
|
| | |
| | | TimeSpan timeSpan = timeNow - FullServiceAuction.Time;
|
| | | int minute = (int)timeSpan.TotalMinutes;
|
| | |
|
| | | DateTime overTime = FullServiceAuction.Time.AddMinutes(AuctionItem.FamilySaleMinutes + AuctionItem.NoticeSaleMinutes);
|
| | | DateTime extensionTime = FullServiceAuction.TimeEnd.AddSeconds(auctionHelpModel.ExtensionTime);
|
| | | if (minute < AuctionItem.NoticeSaleMinutes)//预热中
|
| | | {
|
| | | m_OverTime.gameObject.SetActive(false);
|
| | | if (m_PriceButton.interactable)
|
| | | {
|
| | | m_PriceButton.interactable = false;
|
| | |
| | | int seconds = AuctionItem.NoticeSaleMinutes * 60 - (int)timeSpan.TotalSeconds;
|
| | | m_TimeText.text = Language.Get("PMH_03", TimeUtility.SecondsToHMS(seconds));
|
| | | }
|
| | | else if (minute <= AuctionItem.WorldSaleMinutes+ AuctionItem.NoticeSaleMinutes)//拍卖中
|
| | | else if (minute < (AuctionItem.WorldSaleMinutes + AuctionItem.NoticeSaleMinutes))//拍卖中
|
| | | {
|
| | | m_OverTime.gameObject.SetActive(false);
|
| | | var maxMoney = AuctionItem.BuyoutPrice * FullServiceAuction.ItemCount;
|
| | | var needMoney = 0;
|
| | | if (FullServiceAuction.BidderPrice == 0)
|
| | | {
|
| | | needMoney = AuctionItem.BasePrice * FullServiceAuction.ItemCount;
|
| | | }
|
| | | else
|
| | | {
|
| | | needMoney = FullServiceAuction.BidderPrice + AuctionItem.BiddingAdd * FullServiceAuction.ItemCount;
|
| | | }
|
| | | if (!m_PriceButton.interactable || m_PriceImage.gray)
|
| | | {
|
| | | m_PriceButton.interactable = true;
|
| | | m_PriceImage.gray = false;
|
| | | }
|
| | | if ((!m_BiddingButton.interactable || m_BiddingImage.gray) && maxMoney > needMoney)
|
| | | {
|
| | | m_BiddingButton.interactable = true;
|
| | | m_BiddingImage.gray = false;
|
| | | }
|
| | | if (m_BiddingButton.interactable && needMoney >= maxMoney && AuctionItem.BuyoutPrice != 0)
|
| | | {
|
| | | m_BiddingButton.interactable = false;
|
| | | m_BiddingImage.gray = true;
|
| | | }
|
| | | SetButtonStatus();
|
| | | int seconds = AuctionItem.WorldSaleMinutes * 60 - ((int)timeSpan.TotalSeconds - AuctionItem.NoticeSaleMinutes * 60);
|
| | | m_TimeText.text = Language.Get("PMH_04", TimeUtility.SecondsToHMS(seconds));
|
| | | }
|
| | | else if (timeNow < extensionTime)//加时中
|
| | | if (overTime < extensionTime)//加时中
|
| | | {
|
| | | SetButtonStatus();
|
| | | if (!m_OverTime.gameObject.activeSelf)
|
| | | {
|
| | | m_OverTime.gameObject.SetActive(true);
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | private void SetButtonStatus()
|
| | | {
|
| | | var maxMoney = AuctionItem.BuyoutPrice * FullServiceAuction.ItemCount;
|
| | | var needMoney = 0;
|
| | | if (FullServiceAuction.BidderPrice == 0)
|
| | | {
|
| | | needMoney = AuctionItem.BasePrice * FullServiceAuction.ItemCount;
|
| | | }
|
| | | else
|
| | | {
|
| | | needMoney = FullServiceAuction.BidderPrice + AuctionItem.BiddingAdd * FullServiceAuction.ItemCount;
|
| | | }
|
| | | if (!m_PriceButton.interactable || m_PriceImage.gray)
|
| | | {
|
| | | m_PriceButton.interactable = true;
|
| | | m_PriceImage.gray = false;
|
| | | }
|
| | | if ((!m_BiddingButton.interactable || m_BiddingImage.gray) && maxMoney > needMoney)
|
| | | {
|
| | | m_BiddingButton.interactable = true;
|
| | | m_BiddingImage.gray = false;
|
| | | }
|
| | | if (m_BiddingButton.interactable && needMoney >= maxMoney && AuctionItem.BuyoutPrice != 0)
|
| | | {
|
| | | m_BiddingButton.interactable = false;
|
| | | m_BiddingImage.gray = true;
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | | } |
| | | |
| | | } |