|
@@ -58,6 +58,10 @@ namespace GFGGame
|
|
|
{
|
|
|
|
|
|
});
|
|
|
+ _valueBar.m_btnGallery.onClick.Add(() =>
|
|
|
+ {
|
|
|
+ ViewManager.Show<RuleView>(new object[] { "积分奖励规则", "" });
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
public void Dispose()
|
|
@@ -75,8 +79,10 @@ namespace GFGGame
|
|
|
UpdateCurrency();
|
|
|
UpdateNumeric();
|
|
|
UpdateCJExchange();
|
|
|
- UpdateCJ(LuckyBoxDataManager.Instance.currentBoxId);
|
|
|
+ UpdateCJAExchange();
|
|
|
+ UpdateCJ();
|
|
|
UpdateTravel();
|
|
|
+ UpdateGallery();
|
|
|
EventAgent.AddEventListener(ConstMessage.NUMERIC_CHANGE, UpdateNumeric);
|
|
|
EventAgent.AddEventListener(ConstMessage.ITEM_CHANGED, UpdateItem);
|
|
|
}
|
|
@@ -95,8 +101,10 @@ namespace GFGGame
|
|
|
{
|
|
|
UpdateCurrency();
|
|
|
UpdateCJExchange();
|
|
|
- UpdateCJ(LuckyBoxDataManager.Instance.currentBoxId);
|
|
|
+ UpdateCJAExchange();
|
|
|
+ UpdateCJ();
|
|
|
UpdateTravel();
|
|
|
+ UpdateGallery();
|
|
|
}
|
|
|
private void UpdateCurrency()
|
|
|
{
|
|
@@ -114,29 +122,24 @@ namespace GFGGame
|
|
|
|
|
|
}
|
|
|
|
|
|
- //ÕªÐÇ£¨³é½±£©¶Ò»»
|
|
|
+ //ժ�ǣ��齱���һ�
|
|
|
private void UpdateCJExchange()
|
|
|
{
|
|
|
- int luckyBoxId1 = LuckyBoxDataManager.BOX_ID_2;
|
|
|
- LuckyBoxCfg luckyBoxCfg1 = LuckyBoxCfgArray.Instance.GetCfg(luckyBoxId1);
|
|
|
- _valueBar.m_btnCJLuoXing.text = "" + ItemDataManager.GetItemNum(luckyBoxCfg1.bonusArr[0][0]);
|
|
|
- _valueBar.m_btnCJLuoXing.icon = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(luckyBoxCfg1.bonusArr[0][0]).res);
|
|
|
-
|
|
|
- int luckyBoxId2 = LuckyBoxDataManager.BOX_ID_1;
|
|
|
- LuckyBoxCfg luckyBoxCfg2 = LuckyBoxCfgArray.Instance.GetCfg(luckyBoxId2);
|
|
|
- _valueBar.m_btnCJHuoDong.text = "" + ItemDataManager.GetItemNum(luckyBoxCfg2.bonusArr[0][0]);
|
|
|
- _valueBar.m_btnCJHuoDong.icon = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(luckyBoxCfg2.bonusArr[0][0]).res);
|
|
|
-
|
|
|
-
|
|
|
+ _valueBar.m_btnCJLuoXing.text = "" + ItemDataManager.GetItemNum(ConstItemID.LUCKYBOX_STORE_COST);
|
|
|
+ _valueBar.m_btnCJLuoXing.icon = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(ConstItemID.LUCKYBOX_STORE_COST).res);
|
|
|
}
|
|
|
- public void UpdateCJ(int id)
|
|
|
+ private void UpdateCJAExchange()
|
|
|
{
|
|
|
+ _valueBar.m_btnCJHuoDong.text = "" + ItemDataManager.GetItemNum(ConstItemID.LUCKYBOX_ACTIVITY_STORE_COST);
|
|
|
+ _valueBar.m_btnCJHuoDong.icon = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(ConstItemID.LUCKYBOX_ACTIVITY_STORE_COST).res);
|
|
|
+ }
|
|
|
|
|
|
- LuckyBoxCfg luckyBoxCfg = LuckyBoxCfgArray.Instance.GetCfg(id);
|
|
|
+ public void UpdateCJ()
|
|
|
+ {
|
|
|
+ LuckyBoxCfg luckyBoxCfg = LuckyBoxCfgArray.Instance.GetCfg(LuckyBoxDataManager.Instance.currentBoxId);
|
|
|
if (luckyBoxCfg == null) return;
|
|
|
_valueBar.m_btnCJ.text = "" + ItemDataManager.GetItemNum(luckyBoxCfg.costID);
|
|
|
_valueBar.m_btnCJ.icon = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(luckyBoxCfg.costID).res);
|
|
|
-
|
|
|
}
|
|
|
|
|
|
private void UpdateTravel()
|
|
@@ -146,5 +149,12 @@ namespace GFGGame
|
|
|
_valueBar.m_btnTravel.icon = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(itemId).res);
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ private void UpdateGallery()
|
|
|
+ {
|
|
|
+ _valueBar.m_btnGallery.text = "" + ItemDataManager.GetItemNum(ConstItemID.GALLERY_STORE_COST);
|
|
|
+ _valueBar.m_btnGallery.icon = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(ConstItemID.GALLERY_STORE_COST).res);
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
}
|