diff --git a/Assets/Art/XJMH/pw/pw_prefab/game/effect/PW_Effect_Appear_Prop.prefab b/Assets/Art/XJMH/pw/pw_prefab/game/effect/PW_Effect_Appear_Prop.prefab
index a745dbb73..373264c60 100644
--- a/Assets/Art/XJMH/pw/pw_prefab/game/effect/PW_Effect_Appear_Prop.prefab
+++ b/Assets/Art/XJMH/pw/pw_prefab/game/effect/PW_Effect_Appear_Prop.prefab
@@ -32,9 +32,9 @@ RectTransform:
m_Children: []
m_Father: {fileID: 224064349272752296}
m_LocalEulerAnglesHint: {x: 0, y: -0, z: -0}
- m_AnchorMin: {x: 0.5, y: 0}
- m_AnchorMax: {x: 0.5, y: 0}
- m_AnchoredPosition: {x: 80, y: 66.5}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 0, y: 0}
+ m_AnchoredPosition: {x: 314, y: 66.5}
m_SizeDelta: {x: 230, y: 133}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &222953972021046440
@@ -107,9 +107,9 @@ RectTransform:
m_Children: []
m_Father: {fileID: 224064349272752296}
m_LocalEulerAnglesHint: {x: 0, y: -0, z: -0}
- m_AnchorMin: {x: 0.5, y: 0.5}
- m_AnchorMax: {x: 0.5, y: 0.5}
- m_AnchoredPosition: {x: 0, y: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 0, y: 0}
+ m_AnchoredPosition: {x: 234, y: 166}
m_SizeDelta: {x: 468, y: 332}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &222774089246940628
@@ -198,7 +198,7 @@ Canvas:
m_GameObject: {fileID: 1507404544299976}
m_Enabled: 1
serializedVersion: 3
- m_RenderMode: 2
+ m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
@@ -244,9 +244,9 @@ RectTransform:
m_Children: []
m_Father: {fileID: 224064349272752296}
m_LocalEulerAnglesHint: {x: 0, y: -0, z: -0}
- m_AnchorMin: {x: 0.5, y: 0.5}
- m_AnchorMax: {x: 0.5, y: 0.5}
- m_AnchoredPosition: {x: -75, y: -21.5}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 0, y: 0}
+ m_AnchoredPosition: {x: 159, y: 144.5}
m_SizeDelta: {x: 313, y: 289}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &222588606521285762
diff --git a/Assets/MyGame/aa/Game/XJMH/Boss/XingJiXunHang/XingJiXunHangEvent.cs b/Assets/MyGame/aa/Game/XJMH/Boss/XingJiXunHang/XingJiXunHangEvent.cs
index cbef940be..9b0a87b4a 100644
--- a/Assets/MyGame/aa/Game/XJMH/Boss/XingJiXunHang/XingJiXunHangEvent.cs
+++ b/Assets/MyGame/aa/Game/XJMH/Boss/XingJiXunHang/XingJiXunHangEvent.cs
@@ -1,4 +1,5 @@
using Assets.MyGame.Scripts.Net.APIResponses.Enum;
+using DG.Tweening;
using Newtonsoft.Json.Linq;
using System;
using System.Collections;
@@ -108,6 +109,12 @@ public class XingJiXunHangEvent : BJRedPacketEvent
public GameObject textCritSelf;
[Tooltip("满屏暴击-他人(PW_Effect_TextCrit_Other_XingJiXunHang)")]
public GameObject textCritOther;
+ [Tooltip("暴击分数 TMP 所在子物体名(预制体里数字节点,默认 Text)")]
+ public string critTextNodeName = "Text";
+ [Tooltip("暴击图子物体名(预制体里\"暴击\"图,从 0 延时弹出,默认 Crit)")]
+ public string critNodeName = "Crit";
+ [Tooltip("暴击文字弹出后停留时长(秒),之后整体缩小消失(默认0.8)")]
+ public float critHoldDuration = 0.8f;
// ==================== 道具出场特效 ====================
@@ -400,6 +407,7 @@ public class XingJiXunHangEvent : BJRedPacketEvent
/// 根据武器 ID 选择对应的预制体和标签
private void SelectWeaponPrefabs()
{
+ _weaponId = 6;
switch (_weaponId)
{
case 0:
@@ -1397,9 +1405,15 @@ public class XingJiXunHangEvent : BJRedPacketEvent
/// 自己看 TextCrit_Self,他人看 TextCrit_Other。
///
/// ⭐ 文字内容:预制体里写死的是占位 '123',必须由代码写入「爆奖小鱼死亡累加的面板分」
- /// (,与奖励框上滚动的分同一个值,封顶 maxScore)。
- /// ⭐ 层级:克隆体根上挂着嵌套 Canvas,美术里是无效层ID + order 5,
- /// 会被 FullScreen 框(Default, order 12)压在下面 → 这里显式改成 Default + 更高 order。
+ /// (,与奖励框上滚动的分同一个值,封顶 maxScore),前缀 "+"。
+ /// ⭐ 两个预制体都自带 Canvas(RenderMode=WorldSpace,美术里是无效层ID + order 5),
+ /// 必须统一挂到游戏 UI 层、用 anchoredPosition 定位:
+ /// 自己 → 屏幕中心;他人 → 击杀者座位(座位世界坐标 → 画布坐标)。
+ /// (之前"他人"走 SpawnWorldEffect 挂到 bjEffectRoot(场景根、不在 Canvas 下),
+ /// 它的 WorldSpace 画布会按世界单位渲染 100×100 → 尺寸/位置全错。)
+ /// ⭐ 层级:预制体自带的是无效层ID + order 5,会被 FullScreen 框(Default, order 12)
+ /// 压在下面 → 这里显式改成 Default + 更高 order。
+ /// ⭐ 动画:对齐 lua CritTextEffect —— Text/Crit 从 0 弹出、停留后整体缩小消失并销毁。
///
private void PlayTextCrit()
{
@@ -1410,35 +1424,49 @@ public class XingJiXunHangEvent : BJRedPacketEvent
return;
}
- GameObject critObj;
- if (isSelf)
- {
- // ⭐ 满屏暴击文字是 UI → 放 UI 中心,加入统一销毁列表
- critObj = SpawnUiEffect(critPrefab);
- Debug.Log("[XingJiXunHang] 播放满屏暴击(自己,UI中心)");
- }
- else
- {
- Vector3 critPos = GetSeatPosition() + Vector3.up * 2f;
- critObj = SpawnWorldEffect(critPrefab, critPos);
- if (critObj != null)
- critObj.transform.localScale = Vector3.one * 0.6f;
- Debug.Log($"[XingJiXunHang] 播放满屏暴击(他人) pos={critPos}");
- }
-
+ // ⭐ 自己/他人统一挂 UI 层(同一个渲染空间),位置:自己=屏幕中心,他人=击杀者座位
+ GameObject critObj = SpawnUiEffect(critPrefab);
if (critObj == null)
{
Debug.LogWarning("[XingJiXunHang] 暴击文字生成失败,跳过分数写入");
return;
}
- // ⭐ 写入分数:爆奖过程中小鱼死亡累加的面板分(_bossPanelScore)
- // 该 TMP 的 spriteAsset 已配好「数字→图片」映射,直接赋数字即可
- var critTmp = critObj.GetComponentInChildren(true);
+ if (isSelf)
+ {
+ Debug.Log("[XingJiXunHang] 播放满屏暴击(自己,UI中心)");
+ }
+ else
+ {
+ // ⭐ 他人:座位世界坐标 → 画布 anchoredPosition(与其它 UI 飘字同一套换算)
+ var critRt = critObj.GetComponent();
+ EnsureUiLayer();
+ if (critRt != null && _uiCanvas != null)
+ {
+ Vector3 seatPos = GetSeatPosition() + Vector3.up * 2f;
+ critRt.anchoredPosition =
+ CoordinateTransformation.WorldPos_ToCanvas(seatPos, _uiCanvas);
+ Debug.Log($"[XingJiXunHang] 播放满屏暴击(他人,UI层) seat={seatPos} anchored={critRt.anchoredPosition}");
+ }
+ else
+ {
+ Debug.LogWarning("[XingJiXunHang] 播放满屏暴击(他人):Canvas 缺失,退回 UI 中心");
+ }
+ }
+
+ // ⭐ 取分数 TMP:优先按名字找数字节点(lua 也是按名字取 Text),回退第一个 TMP
+ Transform textNode = string.IsNullOrEmpty(critTextNodeName)
+ ? null
+ : FindChildRecursive(critObj.transform, critTextNodeName);
+ var critTmp = textNode != null
+ ? textNode.GetComponent()
+ : critObj.GetComponentInChildren(true);
+
if (critTmp != null)
{
- critTmp.text = _bossPanelScore.ToString();
- Debug.Log($"[XingJiXunHang] 暴击文字分数 = {_bossPanelScore}(上限{maxScore})");
+ // lua: "+" .. num(该 TMP 的 spriteAsset 已配好「数字→图片」映射)
+ critTmp.text = "+" + _bossPanelScore;
+ Debug.Log($"[XingJiXunHang] 暴击文字分数 = +{_bossPanelScore}(上限{maxScore})");
if (_bossPanelScore <= 0)
Debug.LogWarning("[XingJiXunHang] 暴击文字分数为 0:本次没有小鱼死亡累加(面板分仍为 0)");
}
@@ -1447,7 +1475,7 @@ public class XingJiXunHangEvent : BJRedPacketEvent
Debug.LogWarning($"[XingJiXunHang] 暴击文字 {critObj.name} 上没找到 TMP,分数未写入");
}
- // ⭐ 修层级:嵌套 Canvas → Default(0) + 高于 FullScreen(order 12),
+ // ⭐ 修层级:预制体自带 Canvas → Default(0) + 高于 FullScreen(order 12),
// 否则暴击文字会被全屏特效框挡住(美术里的 -559336389 在本项目 TagManager 里不存在)
var critCanvas = critObj.GetComponent