zhaoyang 2 жил өмнө
parent
commit
341f595a5f

+ 2 - 2
FGUIProject/assets/LuckyBox/combox/ComBox.xml

@@ -14,13 +14,13 @@
     <group id="n66_vols" name="n66" xy="861,241" size="226,148" advanced="true">
       <relation target="" sidePair="right-right,top-top"/>
     </group>
-    <image id="n72_vols" name="n72" src="volstcj" fileName="imageNews/cj_wz_jhsy.png" xy="101,376">
+    <image id="n72_vols" name="imgActLuckyBox" src="volstcj" fileName="imageNews/cj_wz_jhsy.png" xy="101,376" visible="false">
       <relation target="" sidePair="center-center,middle-middle"/>
     </image>
     <image id="n68_vols" name="n68" src="qi041j" fileName="images/cj_zizi_2.png" xy="392,545" group="n71_vols"/>
     <image id="n69_vols" name="n69" src="mzf8tac" fileName="images/cj_zizi_3.png" xy="676,700" group="n71_vols"/>
     <text id="n70_vols" name="txtTime" xy="643,949" size="62,237" group="n71_vols" font="ui://eg2y0ldpwonotj9" fontSize="46" color="#fffbdd" align="center" vAlign="middle" autoSize="height" strokeColor="#a98538" strokeSize="2" text="剩余80天"/>
-    <group id="n71_vols" name="n71" xy="392,545" size="387,700" visible="false" advanced="true">
+    <group id="n71_vols" name="grpLuckyBox" xy="392,545" size="387,700" visible="false" advanced="true">
       <relation target="" sidePair="middle-middle"/>
     </group>
     <component id="n55_vols" name="comCostOne" src="vek812" fileName="components/ComCost.xml" xy="256,1635" pivot="0.5,0" anchor="true" group="n61_vols">

+ 1 - 1
FGUIProject/assets/LuckyBox/combox/ComBox_4.xml

@@ -20,7 +20,7 @@
     <image id="n41_dhoa" name="n41" src="qi041j" fileName="images/cj_zizi_2.png" xy="390,548" group="n42_dhoa"/>
     <image id="n43_mzf8" name="n43" src="mzf8tac" fileName="images/cj_zizi_3.png" xy="674,703" group="n42_dhoa"/>
     <text id="n38_dhoa" name="txtTime" xy="641,952" size="62,237" group="n42_dhoa" font="ui://eg2y0ldpwonotj9" fontSize="46" color="#fffbdd" align="center" vAlign="middle" autoSize="height" strokeColor="#a98538" strokeSize="2" text="剩余80天"/>
-    <group id="n42_dhoa" name="n42" xy="390,548" size="387,700" visible="false" advanced="true">
+    <group id="n42_dhoa" name="n42" xy="390,548" size="387,700" advanced="true">
       <relation target="" sidePair="middle-middle"/>
     </group>
     <component id="n26_njmn" name="comCostOne" src="vek812" fileName="components/ComCost.xml" xy="302,1667" pivot="0.5,0" anchor="true" group="n31_njmn">

+ 6 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComBox.cs

@@ -10,7 +10,9 @@ namespace UI.LuckyBox
         public UI_ComModel m_comModel;
         public UI_Button3 m_btnPreview;
         public GTextField m_txtOwned;
+        public GImage m_imgActLuckyBox;
         public GTextField m_txtTime;
+        public GGroup m_grpLuckyBox;
         public UI_ComCost m_comCostOne;
         public UI_ComCost m_comCostTen;
         public UI_Button1 m_btnBuyOne;
@@ -67,7 +69,9 @@ namespace UI.LuckyBox
             m_comModel = (UI_ComModel)UI_ComModel.Create(comp.GetChild("comModel"));
             m_btnPreview = (UI_Button3)UI_Button3.Create(comp.GetChild("btnPreview"));
             m_txtOwned = (GTextField)comp.GetChild("txtOwned");
+            m_imgActLuckyBox = (GImage)comp.GetChild("imgActLuckyBox");
             m_txtTime = (GTextField)comp.GetChild("txtTime");
+            m_grpLuckyBox = (GGroup)comp.GetChild("grpLuckyBox");
             m_comCostOne = (UI_ComCost)UI_ComCost.Create(comp.GetChild("comCostOne"));
             m_comCostTen = (UI_ComCost)UI_ComCost.Create(comp.GetChild("comCostTen"));
             m_btnBuyOne = (UI_Button1)UI_Button1.Create(comp.GetChild("btnBuyOne"));
@@ -82,7 +86,9 @@ namespace UI.LuckyBox
             m_btnPreview.Dispose();
             m_btnPreview = null;
             m_txtOwned = null;
+            m_imgActLuckyBox = null;
             m_txtTime = null;
+            m_grpLuckyBox = null;
             m_comCostOne.Dispose();
             m_comCostOne = null;
             m_comCostTen.Dispose();

+ 21 - 2
GameClient/Assets/Game/HotUpdate/Views/Common/Controller/LuckyBoxController.cs

@@ -3,6 +3,7 @@ using FairyGUI;
 using ET;
 using System.Collections.Generic;
 using System;
+using UnityEngine;
 
 namespace GFGGame
 {
@@ -31,9 +32,18 @@ namespace GFGGame
             _comModel.m_loaBg.url = ResPathUtil.GetBgImgPath(_luckyBoxCfg.resArr[_bgIndex]);
             if (_luckyBoxCfg.suitShowArr.Length > 0)
             {
-                _dressUpObjUI.ResetSceneObj(100, false, false, null, false);
+                int scale = 100;
+                int direction = 1;
+                if (_luckyBoxCfg.scaleArr.Length > 0)
+                {
+                    scale = Math.Abs(_luckyBoxCfg.scaleArr[_modelIndex]);
+                    direction = _luckyBoxCfg.scaleArr[_modelIndex] >= 0 ? 1 : -1;
+                }
+                _dressUpObjUI.ResetSceneObj(scale, false, false, null, false);
                 _dressUpObjUI.dressUpObj.PutOnSuitCfg(_luckyBoxCfg.suitShowArr[_modelIndex][0], true, new int[] { ConstDressUpItemType.BEI_JING }, false, false);
                 _dressUpObjUI.UpdateWrapper(_comModel.m_holder);
+                _dressUpObjUI.sceneObject.transform.localPosition = new Vector3(_luckyBoxCfg.suitShowArr[_modelIndex][1], _luckyBoxCfg.suitShowArr[_modelIndex][2], 0);
+                _dressUpObjUI.sceneObject.transform.localScale = new Vector3(direction * scale, scale, scale);
             }
             if (_luckyBoxCfg.resArr.Length > 1 || _luckyBoxCfg.suitShowArr.Length > 1)
             {
@@ -57,9 +67,18 @@ namespace GFGGame
                 }
                 if (_luckyBoxCfg.suitShowArr.Length > 0)
                 {
-                    _dressUpObjUI.ResetSceneObj(100, false, false, null, false);
+                    int scale = 100;
+                    int direction = 1;
+                    if (_luckyBoxCfg.scaleArr.Length > 0)
+                    {
+                        scale = Math.Abs(_luckyBoxCfg.scaleArr[_modelIndex]);
+                        direction = _luckyBoxCfg.scaleArr[_modelIndex] >= 0 ? 1 : -1;
+                    }
+                    _dressUpObjUI.ResetSceneObj(scale, false, false, null, false);
                     _dressUpObjUI.dressUpObj.PutOnSuitCfg(_luckyBoxCfg.suitShowArr[_modelIndex][0], true, new int[] { ConstDressUpItemType.BEI_JING }, false, false);
                     _dressUpObjUI.UpdateWrapper(_comModel.m_holder);
+                    _dressUpObjUI.sceneObject.transform.localPosition = new Vector3(_luckyBoxCfg.suitShowArr[_modelIndex][1], _luckyBoxCfg.suitShowArr[_modelIndex][2], 0);
+                    _dressUpObjUI.sceneObject.transform.localScale = new Vector3(direction * scale, scale, scale);
                 }
             }
         }

+ 6 - 6
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxActivityView.cs

@@ -97,12 +97,12 @@ namespace GFGGame
             }
             //=====限时礼包倒计时END
         }
-        
+
         private void UpdateView()
         {
             _ui.m_txtCount.SetVar("value", ActivityDataManager.Instance.lastDrawCount.ToString()).FlushVars();
             _ui.m_txtCount.SetVar("name", _activityCfg.themeName).FlushVars();
-            UI_ComBox_4 comBox = UI_ComBox_4.Proxy(_ui.m_comBox.target);
+            UI_ComBox comBox = UI_ComBox.Proxy(_ui.m_comBox.target);
 
             LuckyBoxDataManager.Instance.InitData(_luckyBoxCfg.id);
             comBox.m_comModel.m_loaBg.url = ResPathUtil.GetBgImgPath(_luckyBoxCfg.resArr[0]);
@@ -129,7 +129,7 @@ namespace GFGGame
                 comBox.m_btnBuyTen.target.onClick.Add(OnClickBtnBuyTen);
             }
             comBox.m_btnBuyTen.target.data = _luckyBoxCfg.id;
-
+            comBox.m_imgActLuckyBox.visible = true;
             if (comBox.m_btnPreview.target.data == null)
             {
                 comBox.m_btnPreview.target.onClick.Add(OnClickBtnPreview);
@@ -138,9 +138,9 @@ namespace GFGGame
 
             comBox.target.data = _luckyBoxCfg.id;
 
-            UI_ComBox_4.ProxyEnd();
+            UI_ComBox.ProxyEnd();
         }
-        
+
         private void UpGiftBox()
         {
             var activityInfoByTypeList =
@@ -216,7 +216,7 @@ namespace GFGGame
         {
             ViewManager.Show<StoreView>(new object[] { ConstStoreTabId.STORE_GIFT_BAG, ConstStoreSubId.STORE_GIFT_BAG_ACTIVITY });
         }
-        
+
         //限时礼包按钮点击执行方法
         private void OnClikcBtnGiftBag()
         {

+ 5 - 1
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxView.cs

@@ -211,13 +211,17 @@ namespace GFGGame
             comBox.m_btnPreview.target.data = boxId;
 
             obj.data = boxId;
-
+            // if (comBox.m_grpLuckyBox != null)
+            // {
+            //     comBox.m_grpLuckyBox.visible = boxId == _activeBoxId;
+            // }
             if (boxId == _activeBoxId)
             {
                 long endTime = LuckyBoxDataManager.Instance.endTime;
                 long curTime = TimeHelper.ServerNow();
                 TimeUtil.FormattingTime(curTime, endTime, out int num, out string str);
                 comBox.m_txtTime.text = string.Format("剩余{0}{1}", num, str);
+                comBox.m_grpLuckyBox.visible = boxId == _activeBoxId;
             }
 
             UI_ComBox.ProxyEnd();

BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_fui.bytes