yyl
2025-11-26 6dd078b9ed38ff99a4912029cca2bd5c309f94fc
Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
5个文件已修改
68 ■■■■ 已修改文件
Main/System/Battle/BaseBattleWin.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroCardCell.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroPosHeadCell.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroUIManager.OnTeam.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/NewBieGuidance/NewBieWin.cs 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Battle/BaseBattleWin.cs
@@ -210,9 +210,13 @@
        int nextSpeedIndex = (BattleManager.Instance.speedIndex + 1) % BattleManager.Instance.speedGear.Length;
        // 检查下一档倍速功能是否开启
        int nextSpeedFuncId = BattleManager.Instance.speedIndexfuncIdArr[nextSpeedIndex];
        if (!FuncOpen.Instance.IsFuncOpen(nextSpeedFuncId, true))
            return;
        BattleManager.Instance.speedIndex = (BattleManager.Instance.speedIndex + 1) % BattleManager.Instance.speedGear.Length;
        bool isOpen = FuncOpen.Instance.IsFuncOpen(nextSpeedFuncId);
        if (!isOpen && FuncOpenLVConfig.HasKey(nextSpeedFuncId))
        {
            var config = FuncOpenLVConfig.Get(nextSpeedFuncId);
            SysNotifyMgr.Instance.ShowTip("BattleSpeedTip", TaskManager.Instance.GetNeedFinishTaskCount(config.LimitMissionID), nextSpeedIndex + 1);
        }
        BattleManager.Instance.speedIndex = !isOpen ? 0 : nextSpeedIndex;
        battleField.SetSpeedRatio(BattleManager.Instance.speedGear[BattleManager.Instance.speedIndex]);
        if (textSpeed != null)
            textSpeed.text = (BattleManager.Instance.speedIndex + 1).ToString();
Main/System/HeroUI/HeroCardCell.cs
@@ -29,6 +29,7 @@
            this.gameObject.SetActive(false);
            return;
        }
        this.gameObject.name = $"HeroCardCell_{hero.heroId}";
        this.gameObject.SetActive(true);
        heroCardBG.SetSprite("herocardbg" + hero.Quality);
Main/System/HeroUI/HeroPosHeadCell.cs
@@ -15,6 +15,7 @@
        var hero = HeroManager.Instance.GetHero(guid);
        var team = TeamManager.Instance.GetTeam(HeroUIManager.Instance.selectTeamType);
        selectRect.SetActive(team.GetHero(guid) != null);
        this.gameObject.name = $"HeroPosHeadCell_{hero.heroId}";
        heroHeadBaseCell.Init(hero.heroId, hero.SkinID, hero.heroStar, hero.awakeLevel, hero.heroLevel, () =>
        {
Main/System/HeroUI/HeroUIManager.OnTeam.cs
@@ -365,7 +365,7 @@
        {
            return 0;
        }
        int indexA = Array.IndexOf(teamSortByJob, heroA.heroConfig.Class);
        int indexB = Array.IndexOf(teamSortByJob, heroB.heroConfig.Class);
@@ -529,5 +529,26 @@
    }
    #endregion
    //上阵中的武将找出等级最低的
    public int GetHeroIDAtLowLV()
    {
        int minLV = int.MaxValue;
        int minID = -1;
        var team = TeamManager.Instance.GetTeam(TeamType.Story);
        for (int i = 0; i < team.serverHeroes.Length; i++)
        {
            if (team.serverHeroes[i] != null)
            {
                if (team.serverHeroes[i].level < minLV)
                {
                    minLV = team.serverHeroes[i].level;
                    minID = team.serverHeroes[i].heroId;
                }
            }
        }
        return minID;
    }
}
Main/System/NewBieGuidance/NewBieWin.cs
@@ -381,21 +381,44 @@
    }
    //BaseCanvas/MainInterfaceWin/Widget_RightBottom/Container_Function/Function_Grid/Grid_6/Content/Btn_@*
    //BaseCanvas/MainInterfaceWin/Widget_RightBottom/Container_Function/Function_Grid/Grid_6/Content/Btn_@
    //分割成BaseCanvas/MainInterfaceWin/Widget_RightBottom/Container_Function/Function_Grid/Grid_6/Content 和 Btn_
    //在WindowCenter.Instance.uiRoot的 BaseCanvas/MainInterfaceWin/Widget_RightBottom/Container_Function/Function_Grid/Grid_6/Content下查找以Btn_开头的第一个子物体
    //在WindowCenter.Instance.uiRoot的 BaseCanvas/MainInterfaceWin/Widget_RightBottom/Container_Function/Function_Grid/Grid_6/Content下
    // 查找以Btn_开头的第一个子物体
        //支持路径末尾加@*做模糊查找
    //支持路径末尾加@做模糊查找 第一个子物体
    private Transform FindTransform(string path)
    {
        if (!path.EndsWith("@*"))
        if (!path.EndsWith("@"))
        {
            return UIManager.Instance.GetUIRoot().transform.Find(path);
        }
        var paths = path.Split('/');
        var newPath = string.Join("/", paths, 0, paths.Length - 1);
        string findName = paths[paths.Length - 1].Replace("@*", "");
        string findName = paths[paths.Length - 1];
        //只有一个@ 才做模糊查找,两个@则取出中间的字符串作为指令标识再做逻辑
        var arr = paths[paths.Length - 1].Split("@");
        if (arr.Length == 3)
        {
            findName = arr[0];
            var code = arr[1];
            if (code == "herolv")
            {
                int heroID = HeroUIManager.Instance.GetHeroIDAtLowLV();
                if (heroID == -1)
                {
                    //确实不存在 则不引导
                    return null;
                }
                return UIManager.Instance.GetUIRoot().transform.Find($"{newPath}/{findName}{heroID}");
            }
            Debug.LogError("引导未知的模糊查找指令:" + code);
            return null;
        }
        findName = paths[paths.Length - 1].Replace("@", "");
        var parent = UIManager.Instance.GetUIRoot().transform.Find(newPath);
        if (parent == null)
        {