Browse Source

修改动画曲线

leiyasi 1 year ago
parent
commit
1b02ef84e3

+ 14 - 13
GameClient/Assets/Game/HotUpdate/Views/ClothingSynthetic/ClothingSyntheticView.cs

@@ -25,7 +25,7 @@ namespace GFGGame
         private const float SHOES_SCALE = 2.5f;
         private const float SHOES_SCALE = 2.5f;
         private const float BODY_SCALE = 1f;
         private const float BODY_SCALE = 1f;
 
 
-        private const float DURATION = 0.6f;
+        private const float DURATION = 0.5f;
 
 
         private readonly int[] HEAD_Y_ARR = new int[] { ConstDressUpItemType.TOU_SHI, ConstDressUpItemType.ER_SHI, ConstDressUpItemType.JING_SHI, ConstDressUpItemType.ZHUANG_RONG };
         private readonly int[] HEAD_Y_ARR = new int[] { ConstDressUpItemType.TOU_SHI, ConstDressUpItemType.ER_SHI, ConstDressUpItemType.JING_SHI, ConstDressUpItemType.ZHUANG_RONG };
         private readonly int[] FA_XING_Y_ARR = new int[] { ConstDressUpItemType.FA_XING };
         private readonly int[] FA_XING_Y_ARR = new int[] { ConstDressUpItemType.FA_XING };
@@ -191,6 +191,7 @@ namespace GFGGame
             UI_ClothingListItem.ProxyEnd();
             UI_ClothingListItem.ProxyEnd();
         }
         }
 
 
+        private EaseType ease = EaseType.ExpoOut;
         private void UpdateRole(bool tween)
         private void UpdateRole(bool tween)
         {
         {
             _dressUpObjUI.ResetSceneObj(45, true, true, null, false);
             _dressUpObjUI.ResetSceneObj(45, true, true, null, false);
@@ -205,33 +206,33 @@ namespace GFGGame
             var dy = _ui.m_compHolder.target.height - 642;
             var dy = _ui.m_compHolder.target.height - 642;
             if (Array.IndexOf(HEAD_Y_ARR, type) >= 0)
             if (Array.IndexOf(HEAD_Y_ARR, type) >= 0)
             {
             {
-                _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);
+                _ui.m_compHolder.m_compMover.target.TweenMoveY(HEAD_Y + dy, duration).SetEase(ease);
+                _ui.m_compHolder.m_compMover.target.TweenScale(new Vector2(HEAD_SCALE, HEAD_SCALE), duration).SetEase(ease);
             }
             }
             else if (Array.IndexOf(FA_XING_Y_ARR, type) >= 0)
             else if (Array.IndexOf(FA_XING_Y_ARR, type) >= 0)
             {
             {
-                _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);
+                _ui.m_compHolder.m_compMover.target.TweenMoveY(FA_XING_Y + dy, duration).SetEase(ease);
+                _ui.m_compHolder.m_compMover.target.TweenScale(new Vector2(FA_XING_SCALE, FA_XING_SCALE), duration).SetEase(ease);
             }
             }
             else if (Array.IndexOf(UPPER_BODY_Y_ARR, type) >= 0)
             else if (Array.IndexOf(UPPER_BODY_Y_ARR, type) >= 0)
             {
             {
-                _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);
+                _ui.m_compHolder.m_compMover.target.TweenMoveY(UPPER_BODY_Y + dy, duration).SetEase(ease);
+                _ui.m_compHolder.m_compMover.target.TweenScale(new Vector2(UPPER_BODY_SCALE, UPPER_BODY_SCALE), duration).SetEase(ease);
             }
             }
             else if (Array.IndexOf(LOWER_BODY_Y_ARR, type) >= 0)
             else if (Array.IndexOf(LOWER_BODY_Y_ARR, type) >= 0)
             {
             {
-                _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);
+                _ui.m_compHolder.m_compMover.target.TweenMoveY(LOWER_BODY_Y + dy, duration).SetEase(ease);
+                _ui.m_compHolder.m_compMover.target.TweenScale(new Vector2(LOWER_BODY_SCALE, LOWER_BODY_SCALE), duration).SetEase(ease);
             }
             }
             else if (Array.IndexOf(SHOES_Y_ARR, type) >= 0)
             else if (Array.IndexOf(SHOES_Y_ARR, type) >= 0)
             {
             {
-                _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);
+                _ui.m_compHolder.m_compMover.target.TweenMoveY(SHOES_Y + dy, duration).SetEase(ease);
+                _ui.m_compHolder.m_compMover.target.TweenScale(new Vector2(SHOES_SCALE, SHOES_SCALE), duration).SetEase(ease);
             }
             }
             else
             else
             {
             {
-                _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);
+                _ui.m_compHolder.m_compMover.target.TweenMoveY(BODY_Y + dy, duration).SetEase(ease);
+                _ui.m_compHolder.m_compMover.target.TweenScale(new Vector2(BODY_SCALE, BODY_SCALE), duration).SetEase(ease);
             }
             }
         }
         }