yyl
13 小时以前 e18e6f74e211bfb65747cac364f942b41620645c
Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
5个文件已修改
104 ■■■■ 已修改文件
Main/Component/UI/Core/GradientText.cs 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Equip/EquipExchangeCell.cs 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Main/MainWin.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/MainLevel/MainBossEnterWin.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/NewBieGuidance/NewBieCenter.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Component/UI/Core/GradientText.cs
@@ -31,7 +31,6 @@
        Horizontal,     // 水平渐变
        Vertical,       // 垂直渐变
        Diagonal,       // 对角线渐变
        Radial,         // 径向渐变
        Custom          // 自定义四角颜色
    }
@@ -154,19 +153,7 @@
        SetVerticesDirty();
    }
    /// <summary>
    /// 设置径向渐变颜色
    /// </summary>
    public void SetRadialGradient(Color centerColor, Color edgeColor)
    {
        m_GradientType = GradientType.Radial;
        m_TopLeftColor = edgeColor;
        m_TopRightColor = edgeColor;
        m_BottomLeftColor = edgeColor;
        m_BottomRightColor = edgeColor;
        // 径向渐变需要在顶点着色器中处理
        SetVerticesDirty();
    }
    protected override void OnPopulateMesh(VertexHelper vh)
    {
@@ -221,21 +208,21 @@
                return Color.Lerp(m_TopLeftColor, m_TopRightColor, x);
                
            case GradientType.Vertical:
                return Color.Lerp(m_TopLeftColor, m_BottomLeftColor, y);
                return Color.Lerp(m_TopLeftColor, m_BottomLeftColor, 1 - y);
                
            case GradientType.Diagonal:
                return Color.Lerp(m_TopLeftColor, m_BottomRightColor, (x + y) * 0.5f);
                // 对角线渐变:从左上到右下
                // 使用更准确的对角线计算,确保从左上到右下的渐变
                var diagonalFactor = Mathf.Clamp01((x + (1 - y)) * 0.5f);
                return Color.Lerp(m_TopLeftColor, m_BottomRightColor, diagonalFactor);
                
            case GradientType.Radial:
                var center = new Vector2(0.5f, 0.5f);
                var distance = Vector2.Distance(new Vector2(x, y), center);
                return Color.Lerp(m_TopLeftColor, m_BottomRightColor, distance * 2f);
                
            case GradientType.Custom:
                // 双线性插值
                // 双线性插值:修正Y轴方向
                var topColor = Color.Lerp(m_TopLeftColor, m_TopRightColor, x);
                var bottomColor = Color.Lerp(m_BottomLeftColor, m_BottomRightColor, x);
                return Color.Lerp(topColor, bottomColor, y);
                return Color.Lerp(topColor, bottomColor, 1 - y);
                
            default:
                return color;
Main/System/Equip/EquipExchangeCell.cs
@@ -171,20 +171,20 @@
    //延迟处理特效大小
    async UniTask RefreshEffect(ItemModel equip)
    { 
        // await UniTask.DelayFrame(3);
        // if (effectID == 0)
        // {
        //     uieffect.Stop();
        // }
        // else
        // {
        //     uieffect.Stop();
        //     uieffect.effectId = effectID;
        //     //计算高度缩放比例 特效显示依赖rect的排版
        //     uieffect.transform.localScale = new Vector3(0.98f, bgRect.rect.height / uieffect.GetComponent<RectTransform>().rect.height, 1);
        //     uieffect.Play();
        // }
        await UniTask.DelayFrame(1);
        int effectID = EquipModel.Instance.equipUIEffects[Math.Min(equip.config.ItemColor, EquipModel.Instance.equipUIEffects.Length) - 1];
        if (effectID == 0)
        {
            uieffect.Stop();
        }
        else
        {
            uieffect.Stop();
            uieffect.effectId = effectID;
            //计算高度缩放比例 特效显示依赖rect的排版
            uieffect.transform.localScale = new Vector3(0.98f, bgRect.rect.height / uieffect.GetComponent<RectTransform>().rect.height, 1);
            uieffect.Play();
        }
        //二次处理放大效果
        await UniTask.Delay(100);
Main/System/Main/MainWin.cs
@@ -28,6 +28,7 @@
    [SerializeField] UIEffectPlayer openCloseAnim;
    [SerializeField] FillTween cdTween;
    [SerializeField] Text hammerText;
    [SerializeField] Text multiFightText;
    bool isForcePlayFightUIAnim = true; //强制播放战斗锤子框动画
@@ -54,6 +55,7 @@
        PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefresh;
        AutoFightModel.Instance.OnFightEvent += OnSkillCast;
        RenameManager.Instance.OnUpdateRenameResultEvent += OnUpdateRenameResultEvent;
        UIManager.Instance.OnCloseWindow += OnCloseWindow;
        base.OnPreOpen();
        // 刷新UI
@@ -65,6 +67,7 @@
        PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefresh;
        AutoFightModel.Instance.OnFightEvent -= OnSkillCast;
        RenameManager.Instance.OnUpdateRenameResultEvent -= OnUpdateRenameResultEvent;
        UIManager.Instance.OnCloseWindow -= OnCloseWindow;
        base.OnPreClose();
        isForcePlayFightUIAnim = true;
    }
@@ -79,6 +82,13 @@
        topBar.SetActive(functionOrder == 0 || functionOrder == 2);
    }
    void OnCloseWindow(UIBase _ui)
    {
        if (_ui.name == "AutoFightWin")
        {
            multiFightText.text = Language.Get("MultiFight", AutoFightModel.Instance.fightCost);
        }
    }
    //战斗按钮动画
    void ClickAnimation(int index)
@@ -293,6 +303,7 @@
            fightOtherWinBG.SetActive(false);
            fightOtherWinWarnImg.SetActive(false);
            fightBG.SetActive(true);
            multiFightText.text = Language.Get("MultiFight", AutoFightModel.Instance.fightCost);
            if (BattleManager.Instance.storyBattleField != null &&
@@ -313,6 +324,7 @@
        {
            //非主城界面
            fightOtherWinBG.SetActive(true);
            multiFightText.text = "";
            fightBG.SetActive(false);
            if (BattleManager.Instance.storyBattleField != null &&
            BattleManager.Instance.storyBattleField.GetBattleMode() == BattleMode.Stop)
Main/System/MainLevel/MainBossEnterWin.cs
@@ -24,6 +24,7 @@
    [SerializeField] Button fightBtn;
    [SerializeField] Image fightIcon;
    [SerializeField] ScrollerController dropItemScroller;
    [SerializeField] Button heroRoadBtn;
    protected override void InitComponent()
@@ -39,6 +40,11 @@
        });
        fightBtn.AddListener(FightBoss);
        heroRoadBtn.AddListener(() =>
        {
            UIManager.Instance.OpenWindow<DayMissionBaseWin>(2);
        });
    }
    protected override void OnPreOpen()
@@ -129,6 +135,8 @@
            }
        }
        bossBG.SetOrgSprite(chapterConfig.BG, "MainLevel");
        heroRoadBtn.SetActive(FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.DayMission));
    }
Main/System/NewBieGuidance/NewBieCenter.cs
@@ -31,8 +31,8 @@
    List<int> allGuides = new List<int>();
    public List<int> completeGuidesBuf = new List<int>();
    //因其他原因导致的等待显示的引导窗口,在OpenWindow时会触发复查,但时机太晚增加关闭界面时触发
    List<string> waitGuideWinNames = new List<string>();
    //因其他原因导致的等待显示的引导窗口,关闭界面时触发检查,但一般在OpenWindow就会被提前处理
    List<int> waitGuideIDs = new List<int>();
    bool inited = false;
@@ -84,20 +84,14 @@
    //关闭其他界面时复查有没需要等待的引导
    void OnCloseWindow(UIBase _ui)
    {
        foreach (var winName in waitGuideWinNames)
        if (TryStartNewBieGuides(waitGuideIDs))
        {
            var guides = GuideConfig.GetGuideListByWinName(winName);
            if (guides != null)
            {
                if (TryStartNewBieGuides(guides))
                {
                    break;
                }
            }
            Debug.Log("执行等待中的引导" + JsonMapper.ToJson(waitGuideIDs));
        }
        if (_ui.name == "StoryBossBattleWin")
        {
            //关闭界面才会触发的引导,如主线boss打完,特殊引导
            var guides = GuideConfig.GetGuideListByType((int)GuideTriggerType.PassMainBoss);
            if (guides != null)
            {
@@ -250,10 +244,11 @@
            (config.PauseMainBattle == 1 && PackManager.Instance.GetItems(PackType.DropItem).Count > 0
            && config.WinName != "EquipExchangeWin"))
        {
            Debug.Log("引导被中断,加入等待队列 " + config.ID);
            //如果子界面是必须挂在该界面上切且没有蒙版盖住的可以增加判断
            if (!waitGuideWinNames.Contains(config.WinName))
            if (!waitGuideIDs.Contains(config.ID))
            {
                waitGuideWinNames.Add(config.WinName);
                waitGuideIDs.Add(config.ID);
            }
            return true;
        }
@@ -283,12 +278,14 @@
        {
            return false;
        }
        if (waitGuideWinNames.Contains(config.WinName))
        if (waitGuideIDs.Contains(config.ID))
        {
            waitGuideWinNames.Remove(config.WinName);
            waitGuideIDs.Remove(config.ID);
        }
        currentGuide = _id;
        Debug.Log($"开始引导ID:{_id}");
        guideStep = config.Steps.Length > 0 ? config.Steps[0] : 0;
        var stepConfig = ScriptableObjectLoader.LoadSoNewBieGuideStep(guideStep);
        TryPauseStoryBattle();