|
@@ -38,7 +38,7 @@ namespace GFGGame
|
|
|
|
|
|
_ui.m_Itemlist.itemRenderer = ListItemRender;
|
|
|
|
|
|
- _ui.m_btnBuy.onClick.Add(OnBtnGetClick);
|
|
|
+ _ui.m_btnBuy.target.onClick.Add(OnBtnGetClick);
|
|
|
_ui.m_btnClose.onClick.Add(this.Hide);
|
|
|
_ui.m_notTips.onClick.Add(OnClickTips);
|
|
|
}
|
|
@@ -67,13 +67,14 @@ namespace GFGGame
|
|
|
int buyNum = ShopDataManager.Instance.GetGoodsBuyNumById(shopCfg.id);
|
|
|
if (shopCfg.maxBuyNum == 0 || buyNum < shopCfg.maxBuyNum)
|
|
|
{
|
|
|
- _ui.m_btnBuy.visible = true;
|
|
|
+ _ui.m_btnBuy.target.visible = true;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- _ui.m_btnBuy.visible = false;
|
|
|
+ _ui.m_btnBuy.target.visible = false;
|
|
|
}
|
|
|
- _ui.m_btnBuy.GetChild("title").text = string.Format("{0}元/购买", shopCfg.configPrice.ToString());
|
|
|
+ _ui.m_btnBuy.target.GetChild("txtPrice").text = string.Format("{0}", shopCfg.configPrice.ToString());
|
|
|
+ _ui.m_btnBuy.target.GetChild("txtOriginalPrice").text = string.Format("{0}", shopCfg.originalPrice.ToString());
|
|
|
|
|
|
var activityInfo = ActivityGlobalDataManager.Instance.GetActivityInfo(6002);
|
|
|
long endTime = 0;
|
|
@@ -85,7 +86,7 @@ namespace GFGGame
|
|
|
if (leftTime <= 0)
|
|
|
{
|
|
|
_ui.m_timeText.text = "";
|
|
|
- _ui.m_btnBuy.visible = false;
|
|
|
+ _ui.m_btnBuy.target.visible = false;
|
|
|
Timers.inst.Remove(UpdateTime);
|
|
|
return;
|
|
|
}
|
|
@@ -108,7 +109,7 @@ namespace GFGGame
|
|
|
}
|
|
|
private void OnBtnGetClick()
|
|
|
{
|
|
|
- _ui.m_btnBuy.visible = false;
|
|
|
+ _ui.m_btnBuy.target.visible = false;
|
|
|
ReqShopBuy(shopId).Coroutine();
|
|
|
}
|
|
|
private void UpdateBtn()
|
|
@@ -117,12 +118,12 @@ namespace GFGGame
|
|
|
if (remainBuyNum == 0)
|
|
|
{
|
|
|
//已售完
|
|
|
- _ui.m_btnBuy.visible = false;
|
|
|
+ _ui.m_btnBuy.target.visible = false;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
//未售完
|
|
|
- _ui.m_btnBuy.visible = true;
|
|
|
+ _ui.m_btnBuy.target.visible = true;
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -161,7 +162,7 @@ namespace GFGGame
|
|
|
if (leftTime <= 0)
|
|
|
{
|
|
|
_ui.m_timeText.text = "";
|
|
|
- _ui.m_btnBuy.visible = false;
|
|
|
+ _ui.m_btnBuy.target.visible = false;
|
|
|
Timers.inst.Remove(UpdateTime);
|
|
|
return;
|
|
|
}
|