From 7a4f40a5a1c8b9209ec9263240143865491af77b Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期三, 15 十月 2025 21:21:53 +0800
Subject: [PATCH] Merge branch 'master' of http://mobile.secondworld.net.cn:10010/r/Project_SG_scripts

---
 Main/Component/UI/Effect/BattleEffectPlayer.cs |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/Main/Component/UI/Effect/BattleEffectPlayer.cs b/Main/Component/UI/Effect/BattleEffectPlayer.cs
index 09a6e93..d740f15 100644
--- a/Main/Component/UI/Effect/BattleEffectPlayer.cs
+++ b/Main/Component/UI/Effect/BattleEffectPlayer.cs
@@ -30,6 +30,8 @@
         }
     }
 
+    public bool isBindBone = false;
+
     public bool isRedCamp = true;
     public EffectConfig effectConfig;
 
@@ -625,4 +627,30 @@
             animator.speed = speedRate;
         }
     }
+
+    public void BindBone(SkeletonAnimation skeletonAnim, string v)
+    {
+        Bone bone = skeletonAnim.skeleton.FindBone(v);
+
+        if (null == bone)
+        {
+             return;
+        }
+
+        isBindBone = true;
+
+        BoneFollower boneFollower = gameObject.AddMissingComponent<BoneFollower>();
+        boneFollower.boneName = v;
+        boneFollower.skeletonRenderer = skeletonAnim;
+        
+        boneFollower.followBoneRotation = false;
+        boneFollower.followXYPosition = true;
+        boneFollower.followZPosition = false;
+        boneFollower.followLocalScale = false;
+        boneFollower.followParentWorldScale = false;
+        boneFollower.followSkeletonFlip = false;
+
+        boneFollower.Initialize();
+        boneFollower.LateUpdate();
+    }
 }

--
Gitblit v1.8.0