lcy
10 天以前 454ffd106aa5aa27c7896184f892fe504d8541fd
602 坐骑优化 增加pma透明度设置
2个文件已修改
24 ■■■■■ 已修改文件
Main/Config/Configs/HorseSkinConfig.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Horse/HorseController.cs 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/HorseSkinConfig.cs
@@ -1,6 +1,6 @@
//--------------------------------------------------------
//    [Author]:           YYL
//    [  Date ]:           Monday, April 13, 2026
//    [  Date ]:           Wednesday, April 29, 2026
//--------------------------------------------------------
using System.Collections.Generic;
@@ -34,6 +34,7 @@
    public string Icon;
    public int showType;
    public int sortOrder;
    public int pmaVertexColorsOpen;
    public override int LoadKey(string _key)
    {
@@ -128,6 +129,8 @@
            int.TryParse(tables[16],out showType); 
            int.TryParse(tables[17],out sortOrder); 
            int.TryParse(tables[18],out pmaVertexColorsOpen);
        }
        catch (Exception exception)
        {
Main/System/Horse/HorseController.cs
@@ -83,6 +83,7 @@
            return;
        }
        skeletonGraphic.enabled = true;
        skeletonGraphic.MeshGenerator.settings.pmaVertexColors = skinConfig.pmaVertexColorsOpen == 1;
        skeletonGraphic.Initialize(true);
        skeletonGraphic.transform.localPosition = new Vector3(skinConfig.Poses[0], skinConfig.Poses[1], 0);
@@ -106,15 +107,15 @@
        // if (heroSkinID == 0)
        // {
        //     if (hero != null && hero.gameObject.activeSelf)
        //     {
        //         hero.SetActive(false);
        //     }
        //     {
        //         hero.SetActive(false);
        //     }
        //     return;    
        // }
        hero = instanceGO.GetComponentInChildren<UIHeroController>(true);
        if (hero == null)
        {
            return;
            return;
        }
        if (heroSkinID == 0)
        {
@@ -123,7 +124,7 @@
        }
        hero.SetActive(true);
        hero.Create(heroSkinID, _scale);
        // 确保 BoneFollowerGraphic 引用到正确的坐骑 SkeletonGraphic
        var boneFollower = hero.GetComponent<BoneFollowerGraphic>();
        if (boneFollower != null && skeletonGraphic != null && skeletonGraphic.enabled)
@@ -141,7 +142,7 @@
            boneFollower.enabled = false;
            hero.transform.localPosition = new Vector3(0, -50, 0);
        }
        if (isHeroShowBefore)
        {
            hero.transform.SetAsLastSibling();
@@ -158,7 +159,7 @@
            return;
        hero.PlayAnimation(motionName, loop, replay);
    }
    public UIHeroController GetHero()
    {
        return hero;
@@ -183,7 +184,7 @@
    /// <param name="motionName">动作名</param>
    /// <param name="loop">循环</param>
    /// <param name="replay">如果相同动作是否再次重播,比如跑步重播就会跳帧不顺滑</param>
    public virtual void PlayAnimation(string motionName, bool loop = false, bool replay=true)
    public virtual void PlayAnimation(string motionName, bool loop = false, bool replay = true)
    {
        if (spineAnimationState == null) return;
@@ -241,7 +242,7 @@
    }
    public void SetEnabled(bool isEnable)
    {
    {
        if (skeletonGraphic == null)
        {
            return;