From 5a7e49f8e2a4591aa32da210535d42656570ab08 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期五, 26 九月 2025 18:05:36 +0800
Subject: [PATCH] 125 战斗 伤害位置错误修复
---
Main/System/Battle/BattleHUDWin.cs | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/Main/System/Battle/BattleHUDWin.cs b/Main/System/Battle/BattleHUDWin.cs
index cb201c6..04c867c 100644
--- a/Main/System/Battle/BattleHUDWin.cs
+++ b/Main/System/Battle/BattleHUDWin.cs
@@ -89,18 +89,15 @@
content.SetDamage(damageInfo, () => RemoveDamageContent(content));
damageContentList.Add(content);
- // heroGo 鐨� parent 浣滀负鍙傝�冭妭鐐�
-
var heroRect = damageInfo.hurtObj.heroRectTrans;
if (heroRect == null)
return;
- // 璁$畻 heroGo 鍦� content 鐖惰妭鐐逛笅鐨� anchoredPosition
var contentRect = content.GetComponent<RectTransform>();
var contentParentRect = contentRect.parent as RectTransform;
- // 鑾峰彇 heroGo 鐨勪笘鐣屽潗鏍�
- Vector3 worldTargetPos = heroRect.TransformPoint(heroRect.anchoredPosition);
+ // 鑾峰彇 heroRect 鐨勪笘鐣屽潗鏍囷紙閿氱偣涓轰腑蹇冿級
+ Vector3 worldTargetPos = heroRect.transform.TransformPoint(heroRect.rect.center);
// 杞崲鍒� content 鐖惰妭鐐逛笅鐨� anchoredPosition
Vector2 anchoredPos;
--
Gitblit v1.8.0