Selaa lähdekoodia

更新valuebar

zhaoyang 3 vuotta sitten
vanhempi
commit
3b1b117e17

+ 11 - 4
GameClient/Assets/Game/HotUpdate/Views/Common/Controller/ValueBarController.cs

@@ -68,6 +68,7 @@ namespace GFGGame
 
         public void OnShown()
         {
+            UpdateCurrency();
             UpdateNumeric();
             UpdateCJExchange();
             UpdateCJ(LuckyBoxDataManager.Instance.currentBoxId);
@@ -89,14 +90,20 @@ namespace GFGGame
         {
             UpdateCJExchange();
             UpdateCJ(LuckyBoxDataManager.Instance.currentBoxId);
+            UpdateCurrency();
+        }
+        private void UpdateCurrency()
+        {
+            _valueBar.m_btnGold.text = "" + RoleDataManager.gold;
+            _valueBar.m_btnDiamondPurple.text = "" + RoleDataManager.diaP;
+            _valueBar.m_btnDiamondRed.text = "" + RoleDataManager.diaR;
         }
-
         private void UpdateNumeric()
         {
-            _valueBar.m_btnGold.text = "" + RoleDataManager.gold; //GameGlobal.myNumericComponent.GetAsInt(NumericType.Gold);
+            // _valueBar.m_btnGold.text = "" + RoleDataManager.gold; //GameGlobal.myNumericComponent.GetAsInt(NumericType.Gold);
             _valueBar.m_btnPower.text = string.Format("{0}/{1}", RoleDataManager.power, GameGlobal.myNumericComponent.GetAsInt(NumericType.PowerLimit));
-            _valueBar.m_btnDiamondPurple.text = "" + RoleDataManager.diaP;// GameGlobal.myNumericComponent.GetAsInt(NumericType.DiamondP);
-            _valueBar.m_btnDiamondRed.text = "" + RoleDataManager.diaR;// GameGlobal.myNumericComponent.GetAsInt(NumericType.DiamondR);
+            // _valueBar.m_btnDiamondPurple.text = "" + RoleDataManager.diaP;// GameGlobal.myNumericComponent.GetAsInt(NumericType.DiamondP);
+            // _valueBar.m_btnDiamondRed.text = "" + RoleDataManager.diaR;// GameGlobal.myNumericComponent.GetAsInt(NumericType.DiamondR);
 
 
         }