瀏覽代碼

卡牌筛选、卡面资源优化

zhaoyang 2 年之前
父節點
當前提交
9d34038d4a

+ 10 - 9
FGUIProject/assets/Card/CardFilterUI.xml

@@ -4,6 +4,8 @@
     <component id="n0_pq5x" name="n0" src="si5ztih" fileName="components/ComBg.xml" pkg="mk0fwx0x" xy="0,0" size="962,938">
       <relation target="" sidePair="center-center,middle-middle"/>
     </component>
+    <component id="n12_pq5x" name="btnChoose" src="pq5x66" fileName="components/btnChoose.xml" xy="685,75"/>
+    <component id="n11_pq5x" name="btnGo" src="pq5x6f" fileName="components/Button8.xml" pkg="eg2y0ldp" xy="317,810"/>
     <component id="n1_pq5x" name="n1" src="ih7596" fileName="components/ComFilterType.xml" pkg="eg2y0ldp" xy="45,72" group="n4_pq5x">
       <property target="txtName" propertyId="0" value="人物"/>
     </component>
@@ -13,28 +15,27 @@
       <item/>
       <item/>
     </list>
-    <group id="n4_pq5x" name="grp0" xy="45,72" size="815,206"/>
-    <component id="n5_pq5x" name="n5" src="ih7596" fileName="components/ComFilterType.xml" pkg="eg2y0ldp" xy="48,315" group="n7_pq5x">
+    <group id="n4_pq5x" name="grp0" xy="45,72" size="815,206" group="n14_ysx9" visible="false" advanced="true"/>
+    <component id="n5_pq5x" name="n5" src="ih7596" fileName="components/ComFilterType.xml" pkg="eg2y0ldp" xy="48,72" group="n7_pq5x">
       <property target="txtName" propertyId="0" value="稀有度"/>
     </component>
-    <list id="n6_pq5x" name="list1" xy="82,375" size="781,146" group="n7_pq5x" layout="flow_hz" selectionMode="multipleSingleClick" lineGap="21" colGap="20" defaultItem="ui://eg2y0ldppq5x6e" autoClearItems="true">
+    <list id="n6_pq5x" name="list1" xy="82,132" size="781,146" group="n7_pq5x" layout="flow_hz" selectionMode="multipleSingleClick" lineGap="21" colGap="20" defaultItem="ui://eg2y0ldppq5x6e" autoClearItems="true">
       <item/>
       <item/>
       <item/>
       <item/>
     </list>
-    <group id="n7_pq5x" name="grp1" xy="48,315" size="815,206"/>
-    <component id="n8_pq5x" name="n8" src="ih7596" fileName="components/ComFilterType.xml" pkg="eg2y0ldp" xy="48,558" group="n10_pq5x">
+    <group id="n7_pq5x" name="grp1" xy="48,72" size="815,206" group="n14_ysx9"/>
+    <component id="n8_pq5x" name="n8" src="ih7596" fileName="components/ComFilterType.xml" pkg="eg2y0ldp" xy="48,303" group="n10_pq5x">
       <property target="txtName" propertyId="0" value="进化"/>
     </component>
-    <list id="n9_pq5x" name="list2" xy="82,618" size="781,146" group="n10_pq5x" layout="flow_hz" selectionMode="multipleSingleClick" lineGap="21" colGap="20" defaultItem="ui://eg2y0ldppq5x6e" autoClearItems="true">
+    <list id="n9_pq5x" name="list2" xy="82,363" size="781,146" group="n10_pq5x" layout="flow_hz" selectionMode="multipleSingleClick" lineGap="21" colGap="20" defaultItem="ui://eg2y0ldppq5x6e" autoClearItems="true">
       <item/>
       <item/>
       <item/>
       <item/>
     </list>
-    <group id="n10_pq5x" name="grp2" xy="48,558" size="815,206"/>
-    <component id="n12_pq5x" name="btnChoose" src="pq5x66" fileName="components/btnChoose.xml" xy="685,75"/>
-    <component id="n11_pq5x" name="btnGo" src="pq5x6f" fileName="components/Button8.xml" pkg="eg2y0ldp" xy="317,810"/>
+    <group id="n10_pq5x" name="grp2" xy="48,303" size="815,206" group="n14_ysx9"/>
+    <group id="n14_ysx9" name="n14" xy="48,72" size="815,437" advanced="true" layout="vt" lineGap="25" excludeInvisibles="true"/>
   </displayList>
 </component>

+ 4 - 1
FGUIProject/assets/CommonGame/components/Button7.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="246,60" extention="Button">
-  <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
+  <controller name="button" pages="0,up,1,down" selected="1"/>
   <displayList>
     <image id="n0_pq5x" name="n0" src="pq5x6b" fileName="images/kp_anniu_3.png" xy="0,0">
       <gearDisplay controller="button" pages="0,2"/>
@@ -13,6 +13,9 @@
     <text id="n2_pq5x" name="title" xy="123,28" pivot="0.5,0.5" anchor="true" size="38,46" fontSize="34" color="#8f6129" align="center" vAlign="middle" text="天">
       <relation target="" sidePair="center-center,middle-middle"/>
     </text>
+    <image id="n3_ysx9" name="n3" src="ysx9tk7" fileName="images/kp_anniu_5.png" xy="206,23">
+      <gearDisplay controller="button" pages="1"/>
+    </image>
   </displayList>
   <Button mode="Check"/>
 </component>

+ 1 - 0
FGUIProject/assets/CommonGame/package.xml

@@ -221,6 +221,7 @@
     <image id="ysx9tk4" name="hqtjtbtb.png" path="/images/"/>
     <image id="ysx9tk5" name="lianyiqun_ys.png" path="/imgItemIcon/" exported="true"/>
     <image id="ysx9tk6" name="xc_bto_1.png" path="/imagesExport/"/>
+    <image id="ysx9tk7" name="kp_anniu_5.png" path="/images/"/>
   </resources>
   <publish name="" path="..\GameClient\Assets\ResIn\UI\CommonGame" packageCount="2" genCode="true" extractAlpha="true"/>
 </packageDescription>

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Constant/ConstMessage.cs

@@ -25,6 +25,7 @@ namespace GFGGame
         public const string CARD_SKILL = "CARD_SKILL";
         public const string CARD_REFRESH = "CARD_REFRESH";
         public const string CARD_FILTER = "CARD_FILTER";
+        public const string CARD_INFO = "CARD_INFO";
 
         public const string PLAT_CARDFOSTER_T1 = "PLAT_CARDFOSTER_T0";
         public const string CLOSE_PHOTOGRAPHVIEW = "CLOSE_PHOTOGRAPHVIEW";

+ 5 - 3
GameClient/Assets/Game/HotUpdate/Data/CardDataManager.cs

@@ -38,20 +38,22 @@ namespace GFGGame
                 ET.Log.Error(cardInfoProto.CardId + "   ItemCfgArray配置不存在");
                 return;
             }
+            cardData.mainScore = itemCfg.mainScore;
+            cardData.resources = CardDataManager.GetCardResources(itemCfg);
+
             cardData.id = cardInfoProto.CardId;
             cardData.lv = cardInfoProto.Lvl;
             cardData.exp = cardInfoProto.Exp;
             cardData.star = cardInfoProto.Star;
             cardData.itemCfg = itemCfg;
-            cardData.resIndex = cardInfoProto.ResIndex;
+            cardData.resIndex = cardInfoProto.ResIndex >= cardData.resources.Count ? 0 : cardInfoProto.ResIndex;
             cardData.scores = new Dictionary<int, int>();
 
             for (int j = 0; j < cardInfoProto.KsAttribute.Count; j++)
             {
                 cardData.scores.Add(cardInfoProto.KsAttribute[j], cardInfoProto.VsAttribute[j]);
             }
-            cardData.mainScore = itemCfg.mainScore;
-            cardData.resources = CardDataManager.GetCardResources(itemCfg);
+
 
             if (_cardDicByType.ContainsKey(0) == false)
             {

+ 9 - 6
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Card/UI_CardFilterUI.cs

@@ -7,11 +7,12 @@ namespace UI.Card
     public partial class UI_CardFilterUI
     {
         public GComponent target;
+        public GButton m_btnChoose;
+        public GButton m_btnGo;
         public GList m_list0;
+        public GGroup m_grp0;
         public GList m_list1;
         public GList m_list2;
-        public GButton m_btnChoose;
-        public GButton m_btnGo;
         public const string URL = "ui://7l6lvkaypq5x64";
         public const string PACKAGE_NAME = "Card";
         public const string RES_NAME = "CardFilterUI";
@@ -59,19 +60,21 @@ namespace UI.Card
 
         private void Init(GComponent comp)
         {
+            m_btnChoose = (GButton)comp.GetChild("btnChoose");
+            m_btnGo = (GButton)comp.GetChild("btnGo");
             m_list0 = (GList)comp.GetChild("list0");
+            m_grp0 = (GGroup)comp.GetChild("grp0");
             m_list1 = (GList)comp.GetChild("list1");
             m_list2 = (GList)comp.GetChild("list2");
-            m_btnChoose = (GButton)comp.GetChild("btnChoose");
-            m_btnGo = (GButton)comp.GetChild("btnGo");
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_btnChoose = null;
+            m_btnGo = null;
             m_list0 = null;
+            m_grp0 = null;
             m_list1 = null;
             m_list2 = null;
-            m_btnChoose = null;
-            m_btnGo = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 1 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/CardSProxy.cs

@@ -31,6 +31,7 @@ namespace GFGGame
                         CardDataManager.Add(response.CardInfos[i]);
                         SkillDataManager.Instance.InitServerData(response.CardInfos[i].CardId, response.CardInfos[i].KsSkill, response.CardInfos[i].VsSkill);
                     }
+                    EventAgent.DispatchEvent(ConstMessage.CARD_INFO);
                 }
             }
         }

+ 2 - 1
GameClient/Assets/Game/HotUpdate/Views/Card/CardDetailView.cs

@@ -50,6 +50,7 @@ namespace GFGGame
         {
             base.AddEventListener();
             EventAgent.AddEventListener(ConstMessage.CARD_FILTER, UpdateCardList);
+            EventAgent.AddEventListener(ConstMessage.CARD_INFO, UpdateCardList);
         }
         protected override void OnShown()
         {
@@ -74,7 +75,7 @@ namespace GFGGame
         {
             base.RemoveEventListener();
             EventAgent.RemoveEventListener(ConstMessage.CARD_FILTER, UpdateCardList);
-
+            EventAgent.RemoveEventListener(ConstMessage.CARD_INFO, UpdateCardList);
         }
         private void UpdateCardList()
         {

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Card/CardFilterView.cs

@@ -52,7 +52,7 @@ namespace GFGGame
             _ui.m_list1.data = EnumCardFilterType.PROPERTY;
 
             _ui.m_list2.itemRenderer = RenderListFosterItem;
-            _ui.m_list2.onClickItem.Add(OnClickListRarityItem);
+            _ui.m_list2.onClickItem.Add(OnClickListFosterItem);
             _ui.m_list2.data = EnumCardFilterType.FOSTER;
 
             _ui.m_btnChoose.onClick.Add(UpdateSelectAll);

二進制
GameClient/Assets/ResIn/UI/Card/Card_fui.bytes


二進制
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0!a.png


二進制
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0.png


二進制
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_1!a.png


二進制
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_1.png


二進制
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes