Browse Source

卡牌升星材料点击区域

zhaoyang 3 years ago
parent
commit
9b9b78e30f

+ 3 - 3
FGUIProject/assets/Card/components/ComConsume.xml

@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="170,175">
   <displayList>
-    <loader id="n35_842s" name="n35" xy="5,15" size="160,160" url="ui://7l6lvkay842s6g" fill="scaleFree"/>
-    <loader id="n36_842s" name="loaItem" xy="29,41" size="112,112" url="ui://eg2y0ldppq5x62" fill="scaleFree">
+    <loader id="n35_842s" name="loaBg" xy="5,15" size="160,160" url="ui://7l6lvkay842s6g" fill="scaleFree"/>
+    <loader id="n36_842s" name="loaItem" xy="29,41" size="112,112" touchable="false" url="ui://eg2y0ldppq5x62" fill="scaleFree">
       <relation target="" sidePair="center-center,middle-middle"/>
     </loader>
     <image id="n33_842s" name="n33" src="842s6f" fileName="images/kp_dikuang_4.png" xy="32,5"/>
-    <component id="n34_842s" name="btnMinus" src="vek88j" fileName="components/btnMinus.xml" xy="115,-3" pkg="eg2y0ldp"/>
+    <component id="n34_842s" name="btnMinus" src="vek88j" fileName="components/btnMinus.xml" pkg="eg2y0ldp" xy="115,-3"/>
     <text id="n39_a713" name="txtUseCount" xy="85,4" pivot="0.5,0" anchor="true" size="82,34" fontSize="24" color="#fff8ea" align="center" autoSize="none" text="1222"/>
     <image id="n37_a713" name="n37" src="a7137b" fileName="images/kp_dikuang_7.png" xy="15,145"/>
     <text id="n38_a713" name="txtNum" xy="53,150" pivot="0.5,0" size="64,34" fontSize="24" color="#fff8ea" text="6666"/>

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Card/UI_ComConsume.cs

@@ -7,6 +7,7 @@ namespace UI.Card
     public partial class UI_ComConsume
     {
         public GComponent target;
+        public GLoader m_loaBg;
         public GLoader m_loaItem;
         public GButton m_btnMinus;
         public GTextField m_txtUseCount;
@@ -58,6 +59,7 @@ namespace UI.Card
 
         private void Init(GComponent comp)
         {
+            m_loaBg = (GLoader)comp.GetChild("loaBg");
             m_loaItem = (GLoader)comp.GetChild("loaItem");
             m_btnMinus = (GButton)comp.GetChild("btnMinus");
             m_txtUseCount = (GTextField)comp.GetChild("txtUseCount");
@@ -65,6 +67,7 @@ namespace UI.Card
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_loaBg = null;
             m_loaItem = null;
             m_btnMinus = null;
             m_txtUseCount = null;

+ 4 - 4
GameClient/Assets/Game/HotUpdate/Views/Card/CardFosterView.cs

@@ -260,13 +260,13 @@ namespace GFGGame
                 listItem.m_btnMinus.onTouchBegin.Add(() => OnClickItemConsumsBegin(obj, 0));
                 listItem.m_btnMinus.onTouchEnd.Add(() => OnClickItemLvConsumsEnd());
             }
-            if (listItem.m_loaItem.data == null)
+            if (listItem.m_loaBg.data == null)
             {
-                listItem.m_loaItem.onTouchBegin.Add(() => OnClickItemConsumsBegin(obj, 1));
-                listItem.m_loaItem.onTouchEnd.Add(() => OnClickItemLvConsumsEnd());
+                listItem.m_loaBg.onTouchBegin.Add(() => OnClickItemConsumsBegin(obj, 1));
+                listItem.m_loaBg.onTouchEnd.Add(() => OnClickItemLvConsumsEnd());
             }
             listItem.m_btnMinus.data = index;
-            listItem.m_loaItem.data = index;
+            listItem.m_loaBg.data = index;
             UI_ComConsume.ProxyEnd();
         }
         private void OnClickItemConsumsBegin(GObject obj, int type)

BIN
GameClient/Assets/ResIn/UI/Card/Card_fui.bytes