Bläddra i källkod

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

* 'master' of http://10.108.64.190:3000/gfg/Client:
  对战减分表现
  显示累充替换ui
  抽奖
  主界面适配
Jae 2 år sedan
förälder
incheckning
b6c7439277

+ 4 - 4
FGUIProject/assets/ActivityThemeLuckyBox/ActivityThemeLuckyBoxUI.xml

@@ -5,13 +5,13 @@
       <relation target="" sidePair="width-width,height-height,center-center,middle-middle"/>
       <relation target="" sidePair="width-width,height-height,center-center,middle-middle"/>
     </loader>
     </loader>
     <component id="n1_mbf1" name="btnBack" src="9xlo8" fileName="components/BtnBack.xml" pkg="eg2y0ldp" xy="35,80"/>
     <component id="n1_mbf1" name="btnBack" src="9xlo8" fileName="components/BtnBack.xml" pkg="eg2y0ldp" xy="35,80"/>
-    <component id="n3_mbf1" name="btnTask" src="mbf1l" fileName="compoents/Button1.xml" xy="953,127" size="94,95" group="n8_mbf1">
-      <Button icon="ui://ubfk2kobmbf12"/>
+    <component id="n3_mbf1" name="btnTask" src="mbf1l" fileName="compoents/Button1.xml" xy="896,147" group="n8_mbf1">
+      <Button icon="ui://ubfk2kobt6j1m"/>
     </component>
     </component>
-    <component id="n7_mbf1" name="btnShop" src="mbf1l" fileName="compoents/Button1.xml" xy="1055,127" size="94,95" group="n8_mbf1" visible="false">
+    <component id="n7_mbf1" name="btnShop" src="mbf1l" fileName="compoents/Button1.xml" xy="998,127" size="94,95" group="n8_mbf1" visible="false">
       <Button icon="ui://ubfk2kobmbf11"/>
       <Button icon="ui://ubfk2kobmbf11"/>
     </component>
     </component>
-    <group id="n8_mbf1" name="n8" xy="953,127" size="94,95" advanced="true" layout="hz" colGap="8" excludeInvisibles="true">
+    <group id="n8_mbf1" name="n8" xy="896,147" size="151,118" advanced="true" layout="hz" colGap="8" excludeInvisibles="true">
       <relation target="" sidePair="right-right,top-top"/>
       <relation target="" sidePair="right-right,top-top"/>
     </group>
     </group>
     <image id="n6_mbf1" name="n6" src="mbf14" fileName="imagesNew/sj_dk.png" pkg="eg2y0ldp" xy="416,105" group="n9_mbf1"/>
     <image id="n6_mbf1" name="n6" src="mbf14" fileName="imagesNew/sj_dk.png" pkg="eg2y0ldp" xy="416,105" group="n9_mbf1"/>

+ 3 - 4
FGUIProject/assets/ActivityThemeLuckyBox/compoents/Button1.xml

@@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
-<component size="100,100" extention="Button">
+<component size="151,118" extention="Button">
   <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
   <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
   <displayList>
   <displayList>
-    <loader id="n3_mbf1" name="icon" xy="0,0" size="100,100" autoSize="true"/>
-    <text id="n4_mbf1" name="title" xy="30,29" pivot="0.5,0.5" size="40,42" fontSize="30" align="center" vAlign="middle" text="">
+    <loader id="n3_mbf1" name="icon" xy="0,0" size="151,118" url="ui://ubfk2kobt6j1m" vAlign="bottom"/>
+    <text id="n4_mbf1" name="title" xy="55,38" pivot="0.5,0.5" size="40,42" fontSize="30" align="center" vAlign="middle" text="">
       <relation target="" sidePair="center-center,middle-middle"/>
       <relation target="" sidePair="center-center,middle-middle"/>
     </text>
     </text>
   </displayList>
   </displayList>
   <Button/>
   <Button/>
-  <relation target="n3_mbf1" sidePair="width-width,height-height"/>
 </component>
 </component>

BIN
FGUIProject/assets/ActivityThemeLuckyBox/images/cj_xsrw_db.png


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

@@ -14,6 +14,7 @@
     <image id="mbf1b" name="lm_biaotizi_15.png" path="/images/"/>
     <image id="mbf1b" name="lm_biaotizi_15.png" path="/images/"/>
     <image id="mbf1c" name="lm_biaotizi_14.png" path="/images/"/>
     <image id="mbf1c" name="lm_biaotizi_14.png" path="/images/"/>
     <component id="mbf1d" name="ActivityThemeLuckyBoxTaskUI.xml" path="/" exported="true"/>
     <component id="mbf1d" name="ActivityThemeLuckyBoxTaskUI.xml" path="/" exported="true"/>
+    <image id="t6j1m" name="cj_xsrw_db.png" path="/images/"/>
   </resources>
   </resources>
   <publish name="" path="../GameClient/Assets/ResIn/UI/ActivityThemeLuckyBox" packageCount="2" genCode="true"/>
   <publish name="" path="../GameClient/Assets/ResIn/UI/ActivityThemeLuckyBox" packageCount="2" genCode="true"/>
 </packageDescription>
 </packageDescription>

+ 3 - 3
FGUIProject/assets/Main/MainUI.xml

@@ -34,16 +34,16 @@
     <component id="n69_weok" name="loaRight" src="weokii" fileName="components/Component7.xml" xy="930,1447" group="n52_qqat">
     <component id="n69_weok" name="loaRight" src="weokii" fileName="components/Component7.xml" xy="930,1447" group="n52_qqat">
       <relation target="" sidePair="center-center,middle-middle"/>
       <relation target="" sidePair="center-center,middle-middle"/>
     </component>
     </component>
-    <component id="n79_g1yr" name="btnFirstRecharge" src="volso9" fileName="components/BtnModle.xml" xy="607,162" group="n88_ktf2">
+    <component id="n79_g1yr" name="btnFirstRecharge" src="volso9" fileName="components/BtnModle.xml" xy="547,162" group="n88_ktf2">
       <Button title="首充"/>
       <Button title="首充"/>
     </component>
     </component>
-    <component id="n80_ktf2" name="btnGiftBag1" src="volso9" fileName="components/BtnModle.xml" xy="758,162" group="n88_ktf2" controller="c1,1">
+    <component id="n80_ktf2" name="btnGiftBag1" src="volso9" fileName="components/BtnModle.xml" xy="728,162" group="n88_ktf2" controller="c1,1">
       <Button title="限时抢购" icon="ui://mfvz4q8kvolsod"/>
       <Button title="限时抢购" icon="ui://mfvz4q8kvolsod"/>
     </component>
     </component>
     <component id="n84_ktf2" name="btnGiftBag2" src="volso9" fileName="components/BtnModle.xml" xy="909,162" group="n88_ktf2" controller="c1,1">
     <component id="n84_ktf2" name="btnGiftBag2" src="volso9" fileName="components/BtnModle.xml" xy="909,162" group="n88_ktf2" controller="c1,1">
       <Button title="特惠礼包" icon="ui://mfvz4q8kvolsoc"/>
       <Button title="特惠礼包" icon="ui://mfvz4q8kvolsoc"/>
     </component>
     </component>
-    <group id="n88_ktf2" name="n88" xy="607,162" size="443,132" group="n52_qqat" advanced="true" layout="hz" colGap="10" excludeInvisibles="true">
+    <group id="n88_ktf2" name="n88" xy="547,162" size="503,132" group="n52_qqat" advanced="true" layout="hz" colGap="40" excludeInvisibles="true">
       <relation target="" sidePair="right-right"/>
       <relation target="" sidePair="right-right"/>
     </group>
     </group>
     <list id="n41_wg7t" name="list" xy="942,321" size="108,1284" group="n57_oju1" overflow="hidden" scroll="horizontal" margin="20,0,0,0" lineGap="20" colGap="14" scrollItemToViewOnClick="false" foldInvisibleItems="true">
     <list id="n41_wg7t" name="list" xy="942,321" size="108,1284" group="n57_oju1" overflow="hidden" scroll="horizontal" margin="20,0,0,0" lineGap="20" colGap="14" scrollItemToViewOnClick="false" foldInvisibleItems="true">

+ 1 - 1
FGUIProject/assets/Main/StoryFightTargetScoreUI.xml

@@ -21,7 +21,7 @@
       <ProgressBar value="100" max="100"/>
       <ProgressBar value="100" max="100"/>
     </component>
     </component>
     <component id="n54_psph" name="comTargetCard" src="volsov" fileName="components/ComTargetSkillShow.xml" xy="1180,420" pivot="0.5,0.5" anchor="true" aspect="true" scale="0.3,0.3"/>
     <component id="n54_psph" name="comTargetCard" src="volsov" fileName="components/ComTargetSkillShow.xml" xy="1180,420" pivot="0.5,0.5" anchor="true" aspect="true" scale="0.3,0.3"/>
-    <component id="n55_psph" name="comDeduction" src="psphix" fileName="components/ComDeduction.xml" xy="45,292" size="325,53"/>
+    <component id="n55_psph" name="comDeduction" src="psphix" fileName="components/ComDeduction.xml" xy="45,292" size="0,53"/>
   </displayList>
   </displayList>
   <transition name="t1">
   <transition name="t1">
     <item time="0" type="Scale" target="n54_psph" value="0.3,0.3"/>
     <item time="0" type="Scale" target="n54_psph" value="0.3,0.3"/>

+ 5 - 5
FGUIProject/assets/Main/components/BtnModle.xml

@@ -1,19 +1,19 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <component size="141,132" extention="Button">
 <component size="141,132" extention="Button">
   <controller name="button" pages="0,up,1,down" selected="0"/>
   <controller name="button" pages="0,up,1,down" selected="0"/>
-  <controller name="c1" exported="true" pages="0,,1," selected="0">
+  <controller name="c1" exported="true" pages="0,,1," selected="1">
     <remark page="0" value="不显示时间"/>
     <remark page="0" value="不显示时间"/>
     <remark page="1" value="显示时间"/>
     <remark page="1" value="显示时间"/>
   </controller>
   </controller>
   <displayList>
   <displayList>
     <loader id="n4_wg7t" name="icon" xy="70,51" pivot="0.5,0.5" anchor="true" size="124,103" url="ui://mfvz4q8kvolsob" autoSize="true"/>
     <loader id="n4_wg7t" name="icon" xy="70,51" pivot="0.5,0.5" anchor="true" size="124,103" url="ui://mfvz4q8kvolsob" autoSize="true"/>
     <image id="n5_vols" name="n5" src="volsoe" fileName="imagesNew/zjm_tb_db_hd.png" xy="0,102"/>
     <image id="n5_vols" name="n5" src="volsoe" fileName="imagesNew/zjm_tb_db_hd.png" xy="0,102"/>
-    <text id="n7_vols" name="title" xy="39,94" pivot="0.5,0" size="63,42" font="ui://eg2y0ldpa0cftkz" fontSize="30" color="#ffffff" align="center" strokeColor="#936f37" text="首充"/>
-    <image id="n10_vols" name="n10" src="volsoa" fileName="imagesNew/zjm_hd_sj_db.png" xy="14,132" pivot="0.5,0" group="n11_vols">
+    <text id="n7_vols" name="title" xy="39,94" pivot="0.5,0" size="63,41" font="ui://eg2y0ldpa0cftkz" fontSize="30" color="#ffffff" align="center" strokeColor="#936f37" text="首充"/>
+    <image id="n10_vols" name="n10" src="volsoa" fileName="imagesNew/zjm_hd_sj_db.png" xy="-20,132" pivot="0.5,0" size="181,25" group="n11_vols">
       <relation target="n9_vols" sidePair="width-width,height-height"/>
       <relation target="n9_vols" sidePair="width-width,height-height"/>
     </image>
     </image>
-    <text id="n9_vols" name="txtTime" xy="20,123" pivot="0.5,0" size="100,39" group="n11_vols" fontSize="28" color="#775839" text="03:58:28"/>
-    <group id="n11_vols" name="grpTime" xy="14,123" size="112,39" advanced="true">
+    <text id="n9_vols" name="txtTime" xy="-14,123" pivot="0.5,0" size="169,39" group="n11_vols" fontSize="28" color="#775839" text="10天10时10分"/>
+    <group id="n11_vols" name="grpTime" xy="-20,123" size="181,39" advanced="true">
       <gearDisplay controller="c1" pages="1"/>
       <gearDisplay controller="c1" pages="1"/>
     </group>
     </group>
   </displayList>
   </displayList>

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

@@ -48,39 +48,39 @@ namespace GFGGame
             if (_luckyBoxCfg.resArr.Length > 1 || _luckyBoxCfg.suitShowArr.Length > 1)
             if (_luckyBoxCfg.resArr.Length > 1 || _luckyBoxCfg.suitShowArr.Length > 1)
             {
             {
                 Timers.inst.Remove(UpdateTime);
                 Timers.inst.Remove(UpdateTime);
-                Timers.inst.Add(1, 0, UpdateTime);
+                Timers.inst.Add(_turnTime, 0, UpdateTime);
             }
             }
         }
         }
 
 
         private void UpdateTime(object param)
         private void UpdateTime(object param)
         {
         {
-            _curTime = _curTime - 1 == 0 ? _turnTime : _curTime - 1;
+            // _curTime = _curTime - 1 == 0 ? _turnTime : _curTime - 1;
 
 
-            if (_curTime == _turnTime)
+            // if (_curTime == _turnTime)
+            // {
+            _bgIndex = _bgIndex + 1 == _luckyBoxCfg.resArr.Length ? 0 : _bgIndex + 1;
+            _modelIndex = _modelIndex + 1 == _luckyBoxCfg.suitShowArr.Length ? 0 : _modelIndex + 1;
+            if (_luckyBoxCfg.resArr.Length > 1)
             {
             {
-                _bgIndex = _bgIndex + 1 == _luckyBoxCfg.resArr.Length ? 0 : _bgIndex + 1;
-                _modelIndex = _modelIndex + 1 == _luckyBoxCfg.suitShowArr.Length ? 0 : _modelIndex + 1;
-                if (_luckyBoxCfg.resArr.Length > 1)
-                {
-                    _comModel.m_loaBg.url = ResPathUtil.GetBgImgPath(_luckyBoxCfg.resArr[_bgIndex]);
+                _comModel.m_loaBg.url = ResPathUtil.GetBgImgPath(_luckyBoxCfg.resArr[_bgIndex]);
 
 
-                }
-                if (_luckyBoxCfg.suitShowArr.Length > 0)
+            }
+            if (_luckyBoxCfg.suitShowArr.Length > 0)
+            {
+                int scale = 100;
+                int direction = 1;
+                if (_luckyBoxCfg.scaleArr.Length > 0)
                 {
                 {
-                    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);
+                    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);
             }
             }
+            // }
         }
         }
 
 
         public void OnHide()
         public void OnHide()

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

@@ -123,15 +123,7 @@ namespace GFGGame
             int boxId = LuckyBoxDataManager.Instance.luckyBoxIds[0];
             int boxId = LuckyBoxDataManager.Instance.luckyBoxIds[0];
             if (this.viewData != null)
             if (this.viewData != null)
             {
             {
-                // object[] datas = (this.viewData as object[]);
-                // if (datas != null && datas.Length > 1)
-                // {
-                //     boxId = (int)datas[1];
-                // }
-                // else
-                // {
                 boxId = (int)this.viewData;
                 boxId = (int)this.viewData;
-                // }
             }
             }
 
 
             if (GuideDataManager.IsGuideFinish(ConstGuideId.LUCKY_BOX) <= 0) boxId = LuckyBoxDataManager.BOX_ID_2;
             if (GuideDataManager.IsGuideFinish(ConstGuideId.LUCKY_BOX) <= 0) boxId = LuckyBoxDataManager.BOX_ID_2;
@@ -149,7 +141,7 @@ namespace GFGGame
 
 
             OnListBgScroll();
             OnListBgScroll();
             updateBoxEffect();
             updateBoxEffect();
-            // Timers.inst.Add(8, 0, UpdateBg);
+
             Timers.inst.AddUpdate(CheckGuide);
             Timers.inst.AddUpdate(CheckGuide);
         }
         }
         private string GetListItemResource(int index)
         private string GetListItemResource(int index)
@@ -175,12 +167,11 @@ namespace GFGGame
             if (!_lcukyBoxCtrl.ContainsKey(boxId))
             if (!_lcukyBoxCtrl.ContainsKey(boxId))
             {
             {
                 _lcukyBoxCtrl.Add(boxId, new LuckyBoxController(comBox.m_comModel.target));
                 _lcukyBoxCtrl.Add(boxId, new LuckyBoxController(comBox.m_comModel.target));
-                // if (_ui.m_listBg.ChildIndexToItemIndex(0) == index)
-                // {
-                //     _lcukyBoxCtrl[index].OnShown(boxId);
-                // }
+                if (_ui.m_listBg.ChildIndexToItemIndex(0) == index)
+                {
+                    _lcukyBoxCtrl[boxId].OnShown(boxId);
+                }
             }
             }
-            if (_lcukyBoxCtrl.ContainsKey(boxId)) _lcukyBoxCtrl[boxId].OnShown(boxId);
             comBox.m_btnPreview.m_c1.selectedIndex = boxId;
             comBox.m_btnPreview.m_c1.selectedIndex = boxId;
             LuckyBoxDataManager.Instance.GetOwnedCount(boxId, out int count, out int totalCount);
             LuckyBoxDataManager.Instance.GetOwnedCount(boxId, out int count, out int totalCount);
             comBox.m_txtOwned.SetVar("v1", "" + count).FlushVars();
             comBox.m_txtOwned.SetVar("v1", "" + count).FlushVars();

BIN
GameClient/Assets/ResIn/UI/ActivityThemeLuckyBox/ActivityThemeLuckyBox_atlas0.png


BIN
GameClient/Assets/ResIn/UI/ActivityThemeLuckyBox/ActivityThemeLuckyBox_fui.bytes


BIN
GameClient/Assets/ResIn/UI/Main/Main_fui.bytes