Эх сурвалжийг харах

Merge remote-tracking branch 'remotes/origin/master' into xiaojie

hexiaojie 2 жил өмнө
parent
commit
e27b5ffd68

+ 13 - 9
FGUIProject/assets/Main/MainUI.xml

@@ -7,12 +7,15 @@
     </image>
     <component id="n61_r9ri" name="headBar" src="slb416" fileName="components/ComponentHeadBar.xml" xy="30,160" group="n52_qqat"/>
     <component id="n79_g1yr" name="btnFirstRecharge" src="volso9" fileName="components/BtnModle.xml" xy="549,162" group="n88_ktf2">
+      <relation target="" sidePair="right-right"/>
       <Button title="首充"/>
     </component>
     <component id="n80_ktf2" name="btnGiftBag1" src="volso9" fileName="components/BtnModle.xml" xy="730,162" group="n88_ktf2" controller="c1,1">
+      <relation target="" sidePair="right-right"/>
       <Button title="限时抢购" icon="ui://mfvz4q8kvolsod"/>
     </component>
     <component id="n84_ktf2" name="btnGiftBag2" src="volso9" fileName="components/BtnModle.xml" xy="911,162" group="n88_ktf2" controller="c1,1">
+      <relation target="" sidePair="right-right"/>
       <Button title="特惠礼包" icon="ui://mfvz4q8kvolsoc"/>
     </component>
     <group id="n88_ktf2" name="n88" xy="549,162" size="503,168" group="n52_qqat" advanced="true" layout="hz" colGap="40" excludeInvisibles="true">
@@ -59,7 +62,8 @@
     <image id="n94_jx6z" name="n94" src="jx6zp3" fileName="imagesNew/zjm_dibutb_db.png" xy="1,1745" group="n52_qqat">
       <relation target="" sidePair="bottom-bottom"/>
     </image>
-    <component id="n4_q08x" name="btnMain" src="q08xu" fileName="components/ButtonModle1.xml" xy="725,1617" size="310,275" group="n52_qqat">
+    <component id="n4_q08x" name="btnMain" src="q08xu" fileName="components/ButtonModle1.xml" xy="725,1616" size="310,275" group="n52_qqat">
+      <relation target="" sidePair="bottom-bottom"/>
       <Button icon="ui://mfvz4q8kv482fm"/>
       <property target="loaLockIcon" propertyId="1" value="ui://mfvz4q8kv95qhs"/>
     </component>
@@ -145,16 +149,16 @@
     <item time="0" type="Visible" target="n58_oju1" value="true"/>
   </transition>
   <transition name="openViewAction" options="4">
-    <item time="0" type="Alpha" target="n94_jx6z" tween="true" startValue="0" endValue="1" duration="24"/>
-    <item time="0" type="XY" target="n4_q08x" tween="true" startValue="725,1917,0.671,0.998" endValue="725,1617,0.671,0.842" duration="24"/>
+    <item time="0" type="Alpha" target="n94_jx6z" tween="true" startValue="0" endValue="1" duration="18"/>
+    <item time="0" type="XY" target="n4_q08x" tween="true" startValue="725,1916" endValue="725,1616" duration="16"/>
     <item time="0" type="XY" target="n57_oju1" tween="true" startValue="1089,334,1.008,0.174" endValue="891,334,0.825,0.174" duration="12"/>
-    <item time="0" type="XY" target="n5_q08x" tween="true" startValue="25,1975,0.023,1.029" endValue="25,1675,0.023,0.872" duration="12"/>
+    <item time="0" type="XY" target="n5_q08x" tween="true" startValue="25,1975" endValue="25,1675" duration="5"/>
     <item time="0" type="XY" target="n61_r9ri" tween="true" startValue="-412,160,-0.381,0.083" endValue="30,160,0.028,0.083" duration="12"/>
-    <item time="0" type="XY" target="n6_q08x" tween="true" startValue="556,1975,0.515,1.029" endValue="556,1675,0.515,0.872" duration="21"/>
-    <item time="0" type="XY" target="n7_q08x" tween="true" startValue="208,1975,0.193,1.029" endValue="208,1675,0.193,0.872" duration="15"/>
-    <item time="0" type="XY" target="n88_ktf2" tween="true" startValue="1141,162" endValue="549,162" duration="12"/>
+    <item time="0" type="XY" target="n6_q08x" tween="true" startValue="556,1975" endValue="556,1675" duration="14"/>
+    <item time="0" type="XY" target="n7_q08x" tween="true" startValue="208,1975" endValue="208,1675" duration="8"/>
+    <item time="0" type="XY" target="n88_ktf2" tween="true" startValue="1141,162" endValue="549,162" duration="6"/>
     <item time="0" type="XY" target="n89_vols" tween="true" startValue="-415,314,-0.384,0.164" endValue="0,314,0,0.164" duration="12"/>
-    <item time="0" type="XY" target="n8_q08x" tween="true" startValue="391,1975" endValue="391,1675,0.362,0.872" duration="18"/>
-    <item time="24" type="Alpha" target="n94_jx6z" value="1"/>
+    <item time="0" type="XY" target="n8_q08x" tween="true" startValue="391,1975" endValue="391,1675" duration="11"/>
+    <item time="18" type="Alpha" target="n94_jx6z" value="1"/>
   </transition>
 </component>

+ 1 - 1
FGUIProject/assets/Main/components/ListChapterItem.xml

@@ -5,6 +5,6 @@
   </displayList>
   <transition name="openListAction">
     <item time="0" type="Alpha" target="n0_slb4" tween="true" startValue="0" endValue="1" duration="12"/>
-    <item time="0" type="XY" target="n0_slb4" tween="true" startValue="500,0,1.082,0" endValue="0,0,0,0" duration="12"/>
+    <item time="0" type="XY" target="n0_slb4" tween="true" startValue="500,0" endValue="0,0" duration="12"/>
   </transition>
 </component>

+ 11 - 13
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxBonusShowView.cs

@@ -11,8 +11,7 @@ namespace GFGGame
         private UI_LuckBoxBonusShowUI _ui;
         private List<ItemData> _rewardList = new List<ItemData>();
         // private List<GameObject> _gameobjects = new List<GameObject>();
-        private Dictionary<int, Dictionary<int, GameObject>> _gameobjects = new Dictionary<int, Dictionary<int, GameObject>>();
-        private Dictionary<int, Dictionary<int, GoWrapper>> _wrappers = new Dictionary<int, Dictionary<int, GoWrapper>>();
+        private Dictionary<int, Dictionary<int, EffectUI>> _effList = new Dictionary<int, Dictionary<int, EffectUI>>();
 
         private EffectUI _effectUI1;
         private EffectUI _effectUI2;
@@ -28,13 +27,15 @@ namespace GFGGame
             //     SceneController.DestroyObjectFromView(_gameobjects[i], _wrappers[i]);
 
             // }
-            foreach (int key in _gameobjects.Keys)
+            foreach (int key in _effList.Keys)
             {
-                foreach (int key1 in _gameobjects[key].Keys)
+                foreach (int key1 in _effList[key].Keys)
                 {
-                    SceneController.DestroyObjectFromView(_gameobjects[key][key1], _wrappers[key][key1]);
+                    EffectUIPool.Recycle(_effList[key][key1]);
+                    _effList[key][key1] = null;
                 }
             }
+            _effList.Clear();
             EffectUIPool.Recycle(_effectUI1);
             _effectUI1 = null;
             EffectUIPool.Recycle(_effectUI2);
@@ -110,18 +111,15 @@ namespace GFGGame
 
             string resPath = itemCfg.rarity == ConstDressRarity.Rarity_TIANYI ? "CK_all_01" : "CK_all_02";
 
-            if (countType == 10 && itemCfg.rarity > 2 && (!_gameobjects.ContainsKey(itemCfg.rarity) || !_gameobjects[itemCfg.rarity].ContainsKey(index)))
+            if (countType == 10 && itemCfg.rarity > 2 && (!_effList.ContainsKey(itemCfg.rarity) || !_effList[itemCfg.rarity].ContainsKey(index)))
             {
-                if (!_gameobjects.ContainsKey(itemCfg.rarity))
+                if (!_effList.ContainsKey(itemCfg.rarity))
                 {
-                    _gameobjects[itemCfg.rarity] = new Dictionary<int, GameObject>();
-                    _wrappers[itemCfg.rarity] = new Dictionary<int, GoWrapper>();
+                    _effList[itemCfg.rarity] = new Dictionary<int, EffectUI>();
                 }
                 GGraph holder = itemCfg.rarity == 3 ? item.m_comIcon.m_holder : item.m_comIcon.m_holder1;
-                SceneController.AddObjectToView(null, null, holder, resPath, out GameObject gameObject, out GoWrapper wrapper);
-                _gameobjects[itemCfg.rarity][index] = gameObject;
-                _wrappers[itemCfg.rarity][index] = wrapper;
-
+                EffectUI _effectUI = EffectUIPool.CreateEffectUI(holder, "ui_LuckyBox", resPath);
+                _effList[itemCfg.rarity][index] = _effectUI;
             }
             if (countType == 1 && itemCfg.rarity > 2 && _effectUI4 == null)
             {

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

@@ -22,8 +22,7 @@ namespace GFGGame
         // private List<GameObject> _gameObjects1 = new List<GameObject>();
         // private List<GoWrapper> _wrappers1 = new List<GoWrapper>();
         private Dictionary<int, List<EffectUI>> dicEffect = new Dictionary<int, List<EffectUI>>();
-        private List<GameObject> lineObj = new List<GameObject>();
-        private List<GoWrapper> lineWrapper = new List<GoWrapper>();
+        private List<EffectUI> effObj = new List<EffectUI>();
         private EffectUI _effectUI1;
         private EffectUI _effectUI2;
         private EffectUI _effectUI3;
@@ -77,9 +76,10 @@ namespace GFGGame
                     value[i] = null;
                 }
             }
-            for (int i = 0; i < lineObj.Count; i++)
+            for (int i = 0; i < effObj.Count; i++)
             {
-                SceneController.DestroyObjectFromView(lineObj[i], lineWrapper[i]);
+                EffectUIPool.Recycle(effObj[i]);
+                effObj[i] = null;
             }
 
             notClickComStars.Clear();
@@ -224,11 +224,9 @@ namespace GFGGame
                     comStar.target.GetChildAt(2).asCom.visible = true;
                     // comStar.target.GetChildAt(1).asCom.visible = false;
                     string resPath = _isLuckyBox ? "LINE_Bule" : "LINE";
-                    SceneController.AddObjectToView(null, null, comStar.m_comLine.m_holder, resPath, out GameObject gameObject, out GoWrapper wrapper);
-                    _effectUI1 = EffectUIPool.CreateEffectUI(comStar.m_comLine.m_holder, "ui_fight_new", resPath);
+                    EffectUI _effectUI = EffectUIPool.CreateEffectUI(comStar.m_comLine.m_holder, "ui_LuckyBox", resPath);
 
-                    lineObj.Add(gameObject);
-                    lineWrapper.Add(wrapper);
+                    effObj.Add(_effectUI);
                     UI_ComStar.ProxyEnd();
 
                     curComStar = comStars[i];

+ 29 - 8
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryChapterListView.cs

@@ -141,18 +141,28 @@ namespace GFGGame
             UI_ListChapterItem.ProxyEnd();
         }
         int _time = 0;
+        int _timeCount = 0;
         private void OnTimerUpdate(object param)
         {
-            _time -= (int)param;
-            if (_time == 0)
+            _timeCount += (int)param;
+            int i = 0;
+            if (_time < _ui.m_listChapter.numChildren)
             {
-                Timers.inst.Remove(OnTimerUpdate);
-                return;
+                i = _time;
+            }
+            else {
+                if (_timeCount > _ui.m_listChapter.numChildren)
+                {
+                    Timers.inst.Remove(OnTimerUpdate);
+                    return;
+                }
+                i = _time - _ui.m_listChapter.numChildren;
             }
-            int i = _ui.m_listChapter.numChildren - _time;
             _ui.m_listChapter.GetChildAt(i).visible = true;
             UI_ListChapterItem listItem = UI_ListChapterItem.Proxy(_ui.m_listChapter.GetChildAt(i));
             listItem.m_openListAction.Play();
+
+            _time += (int)param;
         }
 
         private void UpdateList()
@@ -198,10 +208,21 @@ namespace GFGGame
                 }
                 UI_ListChapterItem.ProxyEnd();
             }
-
-            _time = _ui.m_listChapter.numChildren + 1;
-            Timers.inst.Add(0.1f, _time, OnTimerUpdate, 1);
             _ui.m_listChapter.ScrollToView(currentChapterIndex);
+            int childrenCount = _ui.m_listChapter.numChildren;
+            if (currentChapterIndex == childrenCount - 1)
+            {
+                _time = currentChapterIndex - 2;
+            }
+            else if (currentChapterIndex == childrenCount - 2)
+            {
+                _time = currentChapterIndex - 1;
+            }
+            else { 
+                _time = currentChapterIndex;
+            }
+            _timeCount = 0;
+            Timers.inst.Add(0.1f, _ui.m_listChapter.numChildren, OnTimerUpdate, 1);
         }
         private void CheckGuide(object param)
         {

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