hch
1 天以前 60275f016e144fddeaab0e2fb8b13dd5d6ddbbc8
422 子 【内政】命格系统 / 【内政】命格系统-客户端
1个文件已修改
10 ■■■■ 已修改文件
Main/System/Mingge/MinggeEquipWin.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Mingge/MinggeEquipWin.cs
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using Cysharp.Threading.Tasks;
using UnityEngine;
using UnityEngine.UI;
@@ -7,13 +8,15 @@
    [SerializeField] MinggeEquipChangeCell oldEquipCell;
    [SerializeField] MinggeEquipChangeCell newEquipCell;
    [SerializeField] Transform presetObj;
    [SerializeField] ScrollRect scrollRect;
    [SerializeField] GroupButtonEx[] presetBtns;
    [SerializeField] Text[] presetNameTexts;
    List<Text> presetNameTexts = new List<Text>();
    int selectPresetID = 0;
    int lastDropIndex = -1;
    protected override void InitComponent()
    {
        presetNameTexts.Clear();
        for (int i = 0; i < presetBtns.Length; i++)
        {
            int index = i + 1;
@@ -22,6 +25,7 @@
                selectPresetID = index;
                Display();
            });
            presetNameTexts.Add(presetBtns[i].GetComponentInChildren<Text>());
        }
    }
@@ -70,7 +74,9 @@
                    presetBtns[i].SetActive(false);
                }
            }
            presetBtns[selectPresetID -1].SelectBtn();
            presetBtns[selectPresetID - 1].SelectBtn();
            //滚动到 selectPresetID 位置
            scrollRect.horizontalNormalizedPosition = selectPresetID < 4 ? 0 : selectPresetID * 1f / cnt;
        }
        else
        {