浏览代码

动效修改

huangxiaoyue 2 年之前
父节点
当前提交
4562305476

+ 11 - 10
FGUIProject/assets/Main/MainUI.xml

@@ -59,26 +59,27 @@
     <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="880,1754" size="310,275" group="n52_qqat">
+      <relation target="" sidePair="bottom-bottom"/>
       <Button icon="ui://mfvz4q8kv482fm"/>
       <property target="loaLockIcon" propertyId="1" value="ui://mfvz4q8kv95qhs"/>
     </component>
-    <component id="n5_q08x" name="btnHuanZhuang" src="q08xu" fileName="components/ButtonModle1.xml" xy="25,1675" group="n52_qqat">
+    <component id="n5_q08x" name="btnHuanZhuang" src="q08xu" fileName="components/ButtonModle1.xml" xy="104,1782" group="n52_qqat">
       <relation target="" sidePair="bottom-bottom"/>
       <Button icon="ui://mfvz4q8kv482fn"/>
       <property target="loaLockIcon" propertyId="1" value="ui://mfvz4q8kv95qht"/>
     </component>
-    <component id="n7_q08x" name="btnXiuFang" src="q08xu" fileName="components/ButtonModle1.xml" xy="208,1675" group="n52_qqat">
+    <component id="n7_q08x" name="btnXiuFang" src="q08xu" fileName="components/ButtonModle1.xml" xy="287,1782" group="n52_qqat">
       <relation target="" sidePair="bottom-bottom"/>
       <Button icon="ui://mfvz4q8kv482fo"/>
       <property target="loaLockIcon" propertyId="1" value="ui://mfvz4q8kv95qhu"/>
     </component>
-    <component id="n8_q08x" name="btnCiPai" src="q08xu" fileName="components/ButtonModle1.xml" xy="391,1675" group="n52_qqat">
+    <component id="n8_q08x" name="btnCiPai" src="q08xu" fileName="components/ButtonModle1.xml" xy="470,1782" group="n52_qqat">
       <relation target="" sidePair="bottom-bottom"/>
       <Button icon="ui://mfvz4q8kv482fp"/>
       <property target="loaLockIcon" propertyId="1" value="ui://mfvz4q8kv95qhv"/>
     </component>
-    <component id="n6_q08x" name="btnZhaiXing" src="q08xu" fileName="components/ButtonModle1.xml" xy="556,1675" group="n52_qqat">
+    <component id="n6_q08x" name="btnZhaiXing" src="q08xu" fileName="components/ButtonModle1.xml" xy="635,1782" group="n52_qqat">
       <relation target="" sidePair="bottom-bottom"/>
       <Button icon="ui://mfvz4q8kv482fq"/>
       <property target="loaLockIcon" propertyId="1" value="ui://mfvz4q8kv95qhw"/>
@@ -146,15 +147,15 @@
   </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="XY" target="n4_q08x" tween="true" startValue="880,2054" endValue="880,1754.5" duration="24"/>
     <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="104,2082" endValue="104,1782" duration="4"/>
     <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="n6_q08x" tween="true" startValue="635,2082" endValue="635,1782" duration="19"/>
+    <item time="0" type="XY" target="n7_q08x" tween="true" startValue="287,2082" endValue="287,1782" duration="9"/>
     <item time="0" type="XY" target="n88_ktf2" tween="true" startValue="1141,162" endValue="549,162" duration="12"/>
     <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="0" type="XY" target="n8_q08x" tween="true" startValue="470,2082" endValue="470,1782" duration="14"/>
     <item time="24" type="Alpha" target="n94_jx6z" value="1"/>
   </transition>
 </component>

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

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="158,214" extention="Button">
+<component size="158,214" pivot="0.5,0.5" anchor="true" extention="Button">
   <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
   <displayList>
     <graph id="n2_lki4" name="holder" xy="79,107" size="0,0" touchable="false">

+ 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>

+ 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)
         {

二进制
GameClient/Assets/ResIn/UI/Main/Main_fui.bytes