Browse Source

消耗显示

zhaoyang 2 năm trước cách đây
mục cha
commit
80f89c9942

+ 1 - 4
FGUIProject/assets/Main/StoryLevelInfoUI.xml

@@ -69,9 +69,6 @@
     <loader id="n46_kzvk" name="btnGuide" xy="480,1455" size="120,120"/>
     <text id="n22_t8o1" name="txtUnpassTips" xy="200,1079" pivot="0.5,0" size="404,54" group="n24_t8o1" fontSize="40" color="#d1b3b1" align="center" vars="true" singleLine="true" text="{count=二}星及以上可快速通关"/>
     <group id="n24_t8o1" name="groupUnpass" xy="200,1079" size="404,54" advanced="true"/>
-    <text id="n67_v95q" name="n67" xy="791,1211" size="60,39" group="n55_rqo4" fontSize="28" color="#b89370" vAlign="middle" vars="true" text="花费"/>
-    <loader id="n47_m1l9" name="loaCost" xy="862,1201" size="60,60" group="n55_rqo4" url="ui://eg2y0ldpq08x4" autoSize="true"/>
-    <text id="n18_t8o1" name="txtPowerDesc" xy="933,1211" size="21,39" group="n55_rqo4" fontSize="28" color="#b19270" vAlign="middle" vars="true" text="{power=5}"/>
-    <group id="n55_rqo4" name="n55" xy="791,1201" size="163,60" advanced="true" layout="hz" colGap="11" excludeInvisibles="true"/>
+    <component id="n68_ysx9" name="comCostCurrent" src="n3xha1" fileName="components/ComCostCurrency.xml" pkg="eg2y0ldp" xy="785,1212"/>
   </displayList>
 </component>

+ 3 - 6
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_StoryLevelInfoUI.cs

@@ -30,8 +30,7 @@ namespace UI.Main
         public GLoader m_btnGuide;
         public GTextField m_txtUnpassTips;
         public GGroup m_groupUnpass;
-        public GLoader m_loaCost;
-        public GTextField m_txtPowerDesc;
+        public GComponent m_comCostCurrent;
         public const string URL = "ui://mfvz4q8kvxw538";
         public const string PACKAGE_NAME = "Main";
         public const string RES_NAME = "StoryLevelInfoUI";
@@ -102,8 +101,7 @@ namespace UI.Main
             m_btnGuide = (GLoader)comp.GetChild("btnGuide");
             m_txtUnpassTips = (GTextField)comp.GetChild("txtUnpassTips");
             m_groupUnpass = (GGroup)comp.GetChild("groupUnpass");
-            m_loaCost = (GLoader)comp.GetChild("loaCost");
-            m_txtPowerDesc = (GTextField)comp.GetChild("txtPowerDesc");
+            m_comCostCurrent = (GComponent)comp.GetChild("comCostCurrent");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -131,8 +129,7 @@ namespace UI.Main
             m_btnGuide = null;
             m_txtUnpassTips = null;
             m_groupUnpass = null;
-            m_loaCost = null;
-            m_txtPowerDesc = null;
+            m_comCostCurrent = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightQuicklyView.cs

@@ -197,7 +197,7 @@ namespace GFGGame
             updateNeedItem();
 
 
-            _ui.m_comCostCurrent.visible = true;
+            // _ui.m_comCostCurrent.visible = true;
 
             _index = 0;
             // this.clickBlankToClose = true;

+ 3 - 1
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryLevelInfoView.cs

@@ -199,7 +199,9 @@ namespace GFGGame
             }
             _ui.m_txtTitle.text = title;
             _ui.m_txtLevelDesc.text = levelCfg.desc;
-            _ui.m_txtPowerDesc.SetVar("power", "" + levelCfg.power).FlushVars();
+            ItemUtil.SetItemNeedNum(_ui.m_comCostCurrent, ConstItemID.POWER, levelCfg.power);
+            _ui.m_comCostCurrent.visible = levelCfg.power > 0;
+            // _ui.m_txtPowerDesc.SetVar("power", "" + levelCfg.power).FlushVars();
             _ui.m_scoreType.url = "ui://CommonGame/kp_sx_" + fightCfg.scoreType;
             if (fightCfg.targetName != null && fightCfg.targetName.Length > 0)
             {

BIN
GameClient/Assets/ResIn/UI/Main/Main_fui.bytes