Ver código fonte

换装动作

zhaoyang 2 anos atrás
pai
commit
d691322158

+ 10 - 0
FGUIProject/assets/DressUp/components/Button16.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="96,101" extention="Button">
+  <Button/>
+  <controller name="button" pages="0,up,1,down,2,over,3,selectedOver"/>
+  <displayList>
+    <image id="n0_o4m7" src="o4m7f9" name="n0" xy="0,0">
+      <relation target="" sidePair="width,height"/>
+    </image>
+  </displayList>
+</component>

+ 16 - 15
FGUIProject/assets/DressUp/components/PartsListItem.xml

@@ -1,21 +1,22 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="232,240">
+<component size="232,255">
   <displayList>
-    <loader id="n9_94m1" name="loaBorder" xy="39,0" size="178,178" visible="false" url="ui://mbo439wb94m1dl" autoSize="true"/>
-    <image id="n4_qsvd" name="iconSelected" src="qsvd2l" fileName="images/hz_xzyfxz.png" xy="22,0" size="192,192"/>
-    <loader id="n1_k6he" name="icon" xy="28,6" pivot="0.5,0.5" size="180,180" aspect="true" url="ui://mbo439wbk6he1z" align="center" vAlign="middle" fill="scale" clearOnPublish="true">
+    <loader id="n9_94m1" name="loaBorder" xy="39,12" size="178,178" group="n16_o4m7" visible="false" url="ui://mbo439wb94m1dl" autoSize="true"/>
+    <image id="n4_qsvd" name="iconSelected" src="qsvd2l" fileName="images/hz_xzyfxz.png" xy="22,12" size="192,192" group="n16_o4m7"/>
+    <loader id="n1_k6he" name="icon" xy="28,26" pivot="0.5,0.5" size="180,180" group="n16_o4m7" aspect="true" url="ui://mbo439wbk6he1z" align="center" vAlign="middle" fill="scale" clearOnPublish="true">
       <relation target="" sidePair="center-center,middle-middle"/>
     </loader>
-    <loader id="n7_d4iw" name="rarity" xy="173,10" size="44,94" url="ui://eg2y0ldpd4iw52" autoSize="true"/>
-    <loader id="n5_8xpg" name="ScoreType" xy="24,142" size="50,50" touchable="false" url="ui://eg2y0ldp842s6h" fill="scale"/>
-    <image id="n13_ofwu" name="n13" src="ofwuf8" fileName="images/huanzhuang_sz_db.png" xy="138,164" group="n14_ofwu"/>
-    <text id="n6_8xpg" name="txtScore" xy="146,156" pivot="0.5,0" size="66,44" group="n14_ofwu" font="ui://eg2y0ldpa0cftks" fontSize="32" color="#e9e2d1" align="center" autoClearText="true" text="3500"/>
-    <group id="n14_ofwu" name="grpScore" xy="138,156" size="80,44" advanced="true"/>
-    <image id="n8_pjip" name="imgNeed" src="pjip2z" fileName="images/hz_bcbc_1.png" xy="13,0" size="67,68"/>
-    <image id="n10_ovm4" name="imgNew" src="pzq19p" fileName="imagesExport/cj_hd_xin.png" pkg="eg2y0ldp" xy="0,70" size="70,70"/>
-    <image id="n2_k6he" name="n2" src="k6he1y" fileName="images/hz_minzikuang.png" xy="13,198" size="208,42" group="n11_wono"/>
-    <text id="n3_k6he" name="txtTitle" xy="42,199" pivot="0.5,0" size="152,41" group="n11_wono" fontSize="30" color="#b58f54" align="center" leading="0" text="繁星点点啊"/>
-    <group id="n11_wono" name="n11" xy="13,198" size="208,43"/>
-    <component id="n12_ygap" name="comAxtionSelect" src="ygapet" fileName="components/ComActionSelect.xml" xy="2,0" visible="false"/>
+    <loader id="n7_d4iw" name="rarity" xy="173,22" size="44,94" group="n16_o4m7" touchable="false" url="ui://eg2y0ldpd4iw52" autoSize="true"/>
+    <loader id="n5_8xpg" name="ScoreType" xy="31,148" size="55,55" group="n16_o4m7" aspect="true" touchable="false" url="ui://eg2y0ldp842s6h" fill="scale"/>
+    <image id="n13_ofwu" name="n13" src="ofwuf8" fileName="images/huanzhuang_sz_db.png" xy="138,172" group="n14_ofwu"/>
+    <text id="n6_8xpg" name="txtScore" xy="146,164" pivot="0.5,0" size="66,44" group="n14_ofwu" font="ui://eg2y0ldpa0cftks" fontSize="32" color="#e9e2d1" align="center" autoClearText="true" text="3500"/>
+    <group id="n14_ofwu" name="grpScore" xy="138,164" size="80,44" group="n16_o4m7" advanced="true"/>
+    <image id="n8_pjip" name="imgNeed" src="pjip2z" fileName="images/hz_bcbc_1.png" xy="13,13" size="67,68" group="n16_o4m7"/>
+    <image id="n10_ovm4" name="imgNew" src="pzq19p" fileName="imagesExport/cj_hd_xin.png" pkg="eg2y0ldp" xy="-4,77" size="75,75" group="n16_o4m7" aspect="true"/>
+    <image id="n2_k6he" name="n2" src="k6he1y" fileName="images/hz_minzikuang.png" xy="13,210" size="208,42" group="n11_wono"/>
+    <text id="n3_k6he" name="txtTitle" xy="42,211" pivot="0.5,0" size="152,41" group="n11_wono" fontSize="30" color="#b58f54" align="center" leading="0" text="繁星点点啊"/>
+    <group id="n11_wono" name="n11" xy="13,210" size="208,43" group="n16_o4m7"/>
+    <component id="n15_o4m7" name="btnAni" src="o4m7fa" fileName="components/Button16.xml" xy="10,9" size="75,78" group="n16_o4m7" aspect="true"/>
+    <group id="n16_o4m7" name="n16" xy="-4,9" size="225,244"/>
   </displayList>
 </component>

BIN
FGUIProject/assets/DressUp/imagesNew/hz_tsdz.png


+ 2 - 0
FGUIProject/assets/DressUp/package.xml

@@ -198,6 +198,8 @@
     <image id="v461f5" name="jjcdi_jjxian.png" path="/images/"/>
     <image id="ofwuf7" name="tb_gou_yiyongyou.png" path="/imagesNew/"/>
     <image id="ofwuf8" name="huanzhuang_sz_db.png" path="/images/"/>
+    <image id="o4m7f9" name="hz_tsdz.png" path="/imagesNew/"/>
+    <component id="o4m7fa" name="Button16.xml" path="/components/"/>
   </resources>
   <publish name="" path="../GameClient/Assets/ResIn/UI/DressUp" packageCount="2" genCode="true" extractAlpha="true"/>
 </packageDescription>

+ 0 - 74
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/DressUp/UI_ComActionSelect.cs

@@ -1,74 +0,0 @@
-/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
-
-using FairyGUI;
-
-namespace UI.DressUp
-{
-    public partial class UI_ComActionSelect
-    {
-        public GComponent target;
-        public GButton m_btnNormal;
-        public GButton m_btnAction;
-        public const string URL = "ui://mbo439wbygapet";
-        public const string PACKAGE_NAME = "DressUp";
-        public const string RES_NAME = "ComActionSelect";
-        private static UI_ComActionSelect _proxy;
-
-        public static UI_ComActionSelect Create(GObject gObject = null)
-        {
-            var ui = new UI_ComActionSelect();
-            if(gObject == null)
-            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
-            else
-            	ui.target =  (GComponent)gObject;
-            ui.Init(ui.target);
-            return ui;
-        }
-
-        public static UI_ComActionSelect Proxy(GObject gObject = null)
-        {
-            if(_proxy == null)
-            {
-                _proxy = new UI_ComActionSelect();
-            }
-            var ui = _proxy;
-            if(gObject == null)
-            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
-            else
-            	ui.target =  (GComponent)gObject;
-            ui.Init(ui.target);
-            return ui;
-        }
-
-        public static void ProxyEnd()
-        {
-            if (_proxy != null)
-            {
-                _proxy.Dispose();
-            }
-        }
-
-        public static void ClearProxy()
-        {
-            ProxyEnd();
-            _proxy = null;
-        }
-
-        private void Init(GComponent comp)
-        {
-            m_btnNormal = (GButton)comp.GetChild("btnNormal");
-            m_btnAction = (GButton)comp.GetChild("btnAction");
-        }
-        public void Dispose(bool disposeTarget = false)
-        {
-            m_btnNormal = null;
-            m_btnAction = null;
-            if(disposeTarget && target != null)
-            {
-                target.RemoveFromParent();
-                target.Dispose();
-            }
-            target = null;
-        }
-    }
-}

+ 0 - 11
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/DressUp/UI_ComActionSelect.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 8505cadf4b4b75947afc4e2758c65c3f
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 3 - 4
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/DressUp/UI_PartsListItem.cs

@@ -17,7 +17,7 @@ namespace UI.DressUp
         public GImage m_imgNeed;
         public GImage m_imgNew;
         public GTextField m_txtTitle;
-        public UI_ComActionSelect m_comAxtionSelect;
+        public GButton m_btnAni;
         public const string URL = "ui://mbo439wbk6he26";
         public const string PACKAGE_NAME = "DressUp";
         public const string RES_NAME = "PartsListItem";
@@ -75,7 +75,7 @@ namespace UI.DressUp
             m_imgNeed = (GImage)comp.GetChild("imgNeed");
             m_imgNew = (GImage)comp.GetChild("imgNew");
             m_txtTitle = (GTextField)comp.GetChild("txtTitle");
-            m_comAxtionSelect = (UI_ComActionSelect)UI_ComActionSelect.Create(comp.GetChild("comAxtionSelect"));
+            m_btnAni = (GButton)comp.GetChild("btnAni");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -89,8 +89,7 @@ namespace UI.DressUp
             m_imgNeed = null;
             m_imgNew = null;
             m_txtTitle = null;
-            m_comAxtionSelect.Dispose();
-            m_comAxtionSelect = null;
+            m_btnAni = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/DressUp/ArenaDressUpFightView.cs

@@ -832,6 +832,7 @@ namespace GFGGame
                 longPressGesture.onAction.Add(OnLongPress);
                 _listLongPress.Add(longPressGesture);
             }
+            listItem.m_btnAni.visible = false;
             listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, ext);
             listItem.m_ScoreType.url = "ui://CommonGame/kp_sx_" + InstanceZonesDataManager.currentScoreType;
             listItem.m_txtTitle.text = partName;

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpFightView.cs

@@ -994,6 +994,7 @@ namespace GFGGame
                 longPressGesture.onAction.Add(OnLongPress);
                 _listLongPress.Add(longPressGesture);
             }
+            listItem.m_btnAni.visible = false;
             listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, ext);
             listItem.m_ScoreType.url = "ui://CommonGame/kp_sx_" + _fightCfg.scoreType;
             listItem.m_txtTitle.text = partName;

+ 15 - 12
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpView.cs

@@ -293,6 +293,7 @@ namespace GFGGame
 
             if (_currentMenuType == ConstDressUpItemType.TAO_ZHUANG)
             {
+                // return;//套装有icon的监听
                 isDress = false;
                 partsListScrollingPosY = _ui.m_partsList.m_list.scrollPane.scrollingPosY;
 
@@ -302,7 +303,8 @@ namespace GFGGame
                 }
                 else if (SuitCfgArray.Instance.CheckSuitHasAction(id) && DressUpMenuSuitDataManager.CheckSuitHasActionRes(id))
                 {
-                    listItem.m_comAxtionSelect.target.visible = true;
+                    // listItem.m_btnAni.visible = true;
+                    // listItem.m_comAxtionSelect.target.visible = true;
                     UI_PartsListItem.ProxyEnd();
                 }
                 else
@@ -368,7 +370,7 @@ namespace GFGGame
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(id);
             if (itemCfg != null)
             {
-                if(!DressUpMenuItemDataManager.CheckHasItem(itemCfg.id))
+                if (!DressUpMenuItemDataManager.CheckHasItem(itemCfg.id))
                 {
                     PromptController.Instance.ShowFloatTextPrompt("还未获得这件装扮");
                     return;
@@ -728,7 +730,7 @@ namespace GFGGame
             string iconRes = "";
             string partName = "";
             string ext = "png";
-            listItem.m_comAxtionSelect.target.visible = false;
+            listItem.m_btnAni.visible = false;
             if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
             {
                 SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(id);
@@ -741,21 +743,22 @@ namespace GFGGame
 
                 listItem.m_ScoreType.visible = false;
                 listItem.m_imgNew.visible = false;
+                listItem.m_btnAni.visible = SuitCfgArray.Instance.CheckSuitHasAction(id) && DressUpMenuSuitDataManager.CheckSuitHasActionRes(id);
 
-                listItem.m_comAxtionSelect.m_btnNormal.icon = ResPathUtil.GetIconPath(suitCfg.res, ext);
-                listItem.m_comAxtionSelect.m_btnAction.icon = ResPathUtil.GetIconPath(suitCfg.res, ext);
+                // listItem.m_comAxtionSelect.m_btnNormal.icon = ResPathUtil.GetIconPath(suitCfg.res, ext);
+                // listItem.m_comAxtionSelect.m_btnAction.icon = ResPathUtil.GetIconPath(suitCfg.res, ext);
 
-                if (listItem.m_comAxtionSelect.m_btnNormal.data == null)
+                if (listItem.m_icon.data == null)
                 {
-                    listItem.m_comAxtionSelect.m_btnNormal.onClick.Add(OnBtnNormalClick);
+                    listItem.m_icon.onClick.Add(OnBtnNormalClick);
                 }
-                listItem.m_comAxtionSelect.m_btnNormal.data = id;
+                listItem.m_icon.data = id;
 
-                if (listItem.m_comAxtionSelect.m_btnAction.data == null)
+                if (listItem.m_btnAni.data == null)
                 {
-                    listItem.m_comAxtionSelect.m_btnAction.onClick.Add(OnBtnActionClick);
+                    listItem.m_btnAni.onClick.Add(OnBtnActionClick);
                 }
-                listItem.m_comAxtionSelect.m_btnAction.data = id;
+                listItem.m_btnAni.data = id;
 
 
             }
@@ -844,6 +847,7 @@ namespace GFGGame
                 listItem.m_ScoreType.visible = true;
                 listItem.m_ScoreType.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + itemCfg.mainScore);
             }
+            listItem.m_btnAni.visible = false;
             listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, "png");
             listItem.m_txtTitle.text = partName;
             listItem.target.data = id;
@@ -871,7 +875,6 @@ namespace GFGGame
                 if (_currentMenuType == ConstDressUpItemType.TAO_ZHUANG)
                 {
                     listItem.m_iconSelected.visible = suitId > 0 && id == suitId;
-                    listItem.m_comAxtionSelect.target.visible = id == selectSuitId && SuitCfgArray.Instance.CheckSuitHasAction(id);
                 }
                 else if (_currentMenuType == ConstDressUpItemType.DONG_ZUO)
                 {

BIN
GameClient/Assets/ResIn/UI/DressUp/DressUp_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/DressUp/DressUp_atlas0.png


BIN
GameClient/Assets/ResIn/UI/DressUp/DressUp_fui.bytes