From 454ffd106aa5aa27c7896184f892fe504d8541fd Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期三, 29 四月 2026 19:13:50 +0800
Subject: [PATCH] 602 坐骑优化 增加pma透明度设置

---
 Main/Config/Configs/HorseSkinConfig.cs |    5 ++++-
 Main/System/Horse/HorseController.cs   |   19 ++++++++++---------
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/Main/Config/Configs/HorseSkinConfig.cs b/Main/Config/Configs/HorseSkinConfig.cs
index 07f4660..c02ddd8 100644
--- a/Main/Config/Configs/HorseSkinConfig.cs
+++ b/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)
         {
diff --git a/Main/System/Horse/HorseController.cs b/Main/System/Horse/HorseController.cs
index 9d5dfbb..1b33cc8 100644
--- a/Main/System/Horse/HorseController.cs
+++ b/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;

--
Gitblit v1.8.0