Sfoglia il codice sorgente

Merge branch 'master' of http://10.108.64.190:3000/gfg/client

zhaoyang 2 anni fa
parent
commit
7dff2cf11c

+ 6 - 6
FGUIProject/assets/ClothingSynthetic/ClothingSyntheticUI.xml

@@ -8,16 +8,16 @@
     <component id="n43_g3nf" name="btnHome" src="qp4l60" fileName="components/BtnHome.xml" pkg="eg2y0ldp" xy="170,80"/>
     <component id="n2_j539" name="valueBar" src="v3541v" fileName="components/ComponentValueBar.xml" pkg="eg2y0ldp" xy="0,85" pivot="1,0" controller="c1,6"/>
     <component id="n40_ja9w" name="compHolder" src="ja9w1c" fileName="components/Component1.xml" xy="0,229" touchable="false">
-      <relation target="" sidePair="middle-middle"/>
+      <relation target="" sidePair="bottomext-bottom"/>
     </component>
     <component id="n6_j539" name="compItemInfo" src="ja9w1f" fileName="components/CompItemInfo.xml" xy="735,237"/>
-    <image id="n3_j539" name="n3" src="vek81n" fileName="images/hc_btkuang.png" xy="146,343" group="n46_v95q"/>
-    <text id="n4_j539" name="txtSuitName" xy="162,387" size="46,199" group="n46_v95q" fontSize="38" color="#b38d58" autoSize="height" text="套装名字">
+    <image id="n3_j539" name="n3" src="vek81n" fileName="images/hc_btkuang.png" xy="99,243" group="n46_v95q"/>
+    <text id="n4_j539" name="txtSuitName" xy="115,287" size="46,202" group="n46_v95q" fontSize="38" color="#b38d58" autoSize="height" text="套装名字">
       <relation target="n3_j539" sidePair="center-center,middle-middle"/>
     </text>
-    <group id="n46_v95q" name="n46" xy="146,343" size="78,418"/>
+    <group id="n46_v95q" name="n46" xy="99,243" size="78,418"/>
     <image id="n51_v95q" name="n51" src="v95q2c" fileName="images/hc_zzjsdi.png" xy="874,575" group="n53_v95q"/>
-    <text id="n52_v95q" name="n52" xy="911,633" size="122,41" group="n53_v95q" fontSize="30" color="#c09d6b" text="制作进度"/>
+    <text id="n52_v95q" name="n52" xy="911,633" size="124,42" group="n53_v95q" fontSize="30" color="#c09d6b" text="制作进度"/>
     <text id="n27_j539" name="txtProgress" xy="931,680" pivot="0.5,0" size="80,44" group="n53_v95q" fontSize="32" color="#d7847e" ubb="true" vars="true" text="10/20">
       <relation target="" sidePair="center-center"/>
     </text>
@@ -48,7 +48,7 @@
     <component id="n21_j539" name="btnProduction" src="oqa1tjt" fileName="components/Button21.xml" pkg="mk0fwx0x" xy="368,1435" group="n59_v95q">
       <Button title="制作"/>
     </component>
-    <component id="n48_v95q" name="comCostCurrency" src="n3xha1" fileName="components/ComCostCurrency.xml" pkg="eg2y0ldp" xy="418,1369" size="235,46" group="n59_v95q"/>
+    <component id="n48_v95q" name="comCostCurrency" src="n3xha1" fileName="components/ComCostCurrency.xml" pkg="eg2y0ldp" xy="418,1369" size="120,46" group="n59_v95q"/>
     <group id="n59_v95q" name="n59" xy="0,853" size="1080,1067" advanced="true">
       <relation target="" sidePair="bottom-bottom"/>
     </group>

+ 6 - 2
FGUIProject/assets/ClothingSynthetic/components/Component1.xml

@@ -1,7 +1,11 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1080,642" mask="n4_ja9w">
   <displayList>
-    <component id="n3_hinb" name="compMover" src="ja9w1d" fileName="components/Component2.xml" xy="387,320"/>
-    <graph id="n4_ja9w" name="n4" xy="0,0" size="1080,642" type="rect" fillColor="#ff000000"/>
+    <component id="n3_hinb" name="compMover" src="ja9w1d" fileName="components/Component2.xml" xy="387,320">
+      <relation target="" sidePair=""/>
+    </component>
+    <graph id="n4_ja9w" name="n4" xy="0,0" size="1080,642" type="rect" fillColor="#ff000000">
+      <relation target="" sidePair="width-width,height-height"/>
+    </graph>
   </displayList>
 </component>

+ 21 - 8
GameClient/Assets/Game/HotUpdate/DressUp/DressUpObj.cs

@@ -285,18 +285,23 @@ namespace GFGGame
         /// <summary>
         /// 尝试穿戴配置套装
         /// </summary>
-        /// <param name="id">套装id</param>
+        /// <param name="suitId">套装id</param>
         /// <param name="tryShowAction">尝试穿上动作</param>
         /// <param name="excludeType">排除类型列表</param>
         /// <param name="showOptional">是否显示可选部件</param>
         /// <param name="CheckOwn">是否只显示主角拥有的部件</param>
-        public void PutOnSuitCfg(int id, bool tryShowAction, int[] excludeType = null, bool showOptional = true, bool CheckOwn = true)
+        public void PutOnSuitCfg(int suitId, bool tryShowAction, int[] excludeType = null, bool showOptional = true, bool CheckOwn = true)
         {
+            SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(suitId);
+            if(suitCfg == null)
+            {
+                return;
+            }
             bool oldIsAction = IsAction;
-            _dressUpData.suitId = id;
+            _dressUpData.suitId = suitId;
             bool hasSuitActionRes = DressUpMenuSuitDataManager.CheckSuitHasActionRes(_dressUpData.suitId);
-            _dressUpData.actionId = (hasSuitActionRes && tryShowAction) ? id : 0;
-            SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(_dressUpData.suitId);
+            _dressUpData.actionId = (hasSuitActionRes && tryShowAction) ? suitId : 0;
+            
             List<int> items = new List<int>(suitCfg.partsArr);
             if (showOptional)
             {
@@ -403,17 +408,25 @@ namespace GFGGame
         }
 
         //穿戴一组换装数据
-        public void PutOnDressUpData(DressUpData targetDressUpData)
+        public void PutOnDressUpData(DressUpData targetDressUpData, int[] excludeType = null)
         {
             bool oldIsAction = IsAction;
             _dressUpData.suitId = targetDressUpData.suitId;
             _dressUpData.actionId = targetDressUpData.actionId;
             var targetItemList = new List<int>();
-            targetItemList.AddRange(targetDressUpData.itemList);
-            if (targetDressUpData.bgId > 0)
+            foreach(var itemId in targetDressUpData.itemList)
+            {
+                int subType = ItemUtilCS.GetItemSubType(itemId);
+                if (excludeType == null || Array.IndexOf(excludeType, subType) < 0)
+                {
+                    targetItemList.Add(itemId);
+                }
+            }
+            if (targetDressUpData.bgId > 0 && (excludeType == null || Array.IndexOf(excludeType, ConstDressUpItemType.BEI_JING) < 0))
             {
                 targetItemList.Add(targetDressUpData.bgId);
             }
+
             CompareAndAddItemList(oldIsAction, IsAction, targetItemList);
             checkDefaultItem();
 

+ 4 - 1
GameClient/Assets/Game/HotUpdate/Utils/SuitUtil.cs

@@ -260,7 +260,10 @@ namespace GFGGame
                 SuitCfg[] dataArray = SuitCfgArray.Instance.dataArray;
                 foreach (SuitCfg suitCfg in dataArray)
                 {
-                    CheckToAdd(suitCfg.id);
+                    if(suitCfg.id != 210000)//特殊处理,隐藏
+                    {
+                        CheckToAdd(suitCfg.id);
+                    }
                 }
             }
             else

+ 7 - 6
GameClient/Assets/Game/HotUpdate/Views/ClothingSynthetic/ClothingSyntheticView.cs

@@ -202,34 +202,35 @@ namespace GFGGame
             {
                 duration = 0;
             }
+            var dy = _ui.m_compHolder.target.height - 642;
             if (Array.IndexOf(HEAD_Y_ARR, type) >= 0)
             {
-                _ui.m_compHolder.m_compMover.target.TweenMoveY(HEAD_Y, duration);
+                _ui.m_compHolder.m_compMover.target.TweenMoveY(HEAD_Y + dy, duration);
                 _ui.m_compHolder.m_compMover.target.TweenScale(new Vector2(HEAD_SCALE, HEAD_SCALE), duration);
             }
             else if (Array.IndexOf(FA_XING_Y_ARR, type) >= 0)
             {
-                _ui.m_compHolder.m_compMover.target.TweenMoveY(FA_XING_Y, duration);
+                _ui.m_compHolder.m_compMover.target.TweenMoveY(FA_XING_Y + dy, duration);
                 _ui.m_compHolder.m_compMover.target.TweenScale(new Vector2(FA_XING_SCALE, FA_XING_SCALE), duration);
             }
             else if (Array.IndexOf(UPPER_BODY_Y_ARR, type) >= 0)
             {
-                _ui.m_compHolder.m_compMover.target.TweenMoveY(UPPER_BODY_Y, duration);
+                _ui.m_compHolder.m_compMover.target.TweenMoveY(UPPER_BODY_Y + dy, duration);
                 _ui.m_compHolder.m_compMover.target.TweenScale(new Vector2(UPPER_BODY_SCALE, UPPER_BODY_SCALE), duration);
             }
             else if (Array.IndexOf(LOWER_BODY_Y_ARR, type) >= 0)
             {
-                _ui.m_compHolder.m_compMover.target.TweenMoveY(LOWER_BODY_Y, duration);
+                _ui.m_compHolder.m_compMover.target.TweenMoveY(LOWER_BODY_Y + dy, duration);
                 _ui.m_compHolder.m_compMover.target.TweenScale(new Vector2(LOWER_BODY_SCALE, LOWER_BODY_SCALE), duration);
             }
             else if (Array.IndexOf(SHOES_Y_ARR, type) >= 0)
             {
-                _ui.m_compHolder.m_compMover.target.TweenMoveY(SHOES_Y, duration);
+                _ui.m_compHolder.m_compMover.target.TweenMoveY(SHOES_Y + dy, duration);
                 _ui.m_compHolder.m_compMover.target.TweenScale(new Vector2(SHOES_SCALE, SHOES_SCALE), duration);
             }
             else
             {
-                _ui.m_compHolder.m_compMover.target.TweenMoveY(BODY_Y, duration);
+                _ui.m_compHolder.m_compMover.target.TweenMoveY(BODY_Y + dy, duration);
                 _ui.m_compHolder.m_compMover.target.TweenScale(new Vector2(BODY_SCALE, BODY_SCALE), duration);
             }
         }

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

@@ -414,7 +414,7 @@ namespace GFGGame
                     _dressUpObjUI.ResetSceneObj(80, true, false, null, false);
                     if (storyDialogCfg.suitId > 0)
                     {
-                        _dressUpObjUI.dressUpObj.PutOnSuitCfg(storyDialogCfg.suitId, false, new int[] { ConstDressUpItemType.BEI_JING }, false, false);
+                        _dressUpObjUI.dressUpObj.PutOnSuitCfg(storyDialogCfg.suitId, false, new int[] { ConstDressUpItemType.SHOU_CHI_WU }, false, false);
                     }
                     else
                     {
@@ -422,6 +422,7 @@ namespace GFGGame
                         if (_dressUpObjUI.dressUpObj.actionId > 0)
                         {
                             _dressUpObjUI.dressUpObj.CancelAction(true);
+                            _dressUpObjUI.dressUpObj.PutOnDressUpData(_dressUpObjUI.dressUpObj.DressUpDataClone(), new int[] { ConstDressUpItemType.SHOU_CHI_WU });
                         }
                     }
                     if (headAniCfg != null && headAniCfg.faceId > 0)

BIN
GameClient/Assets/ResIn/UI/ClothingSynthetic/ClothingSynthetic_fui.bytes