Răsfoiți Sursa

爬塔界面适配问题修改

zhangyuqian 11 luni în urmă
părinte
comite
2d1ab424b5

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/FieldWork/FieldWorkLevelView.cs

@@ -119,11 +119,11 @@ namespace GFGGame
                     isPassCount++;
                 }
             }
-            int levelCount = CimbingTowerLevelCfgArray.Instance.dataArray.Length - isPassCount;
+            float levelCount = CimbingTowerLevelCfgArray.Instance.dataArray.Length - isPassCount;
             float height = _ui.m_chapter.target.height;
-            float value = 300 / (_ui.m_chapter.target.height / 1080.0f);
+            float value = levelCount / CimbingTowerLevelCfgArray.Instance.dataArray.Length;
             indexY = value * Mathf.Max(0, (float)levelCount);
-            _ui.m_chapter.target.scrollPane.posY = indexY;
+            _ui.m_chapter.target.scrollPane.SetPercY(value, false);
         }
         private void OnClickLevelItem(EventContext context)
         {