(client) feat:添加消息定义,添加故事定义及其运算,武器动画可用,装备UI可用以及切换武器 fix:修复快速攻击导致协程释放出错卡死,重构为计时器,修复类型转换错误导致报错
This commit is contained in:
@ -22,7 +22,7 @@ namespace Prefab
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_originalPosition = transform.position; // 初始位置只需在组件生命周期中获取一次
|
||||
_originalPosition = transform.localPosition; // 初始位置只需在组件生命周期中获取一次
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
@ -51,7 +51,7 @@ namespace Prefab
|
||||
var yOffset = GetYPosition?.Invoke(currentAnimationTime) ?? 0f;
|
||||
|
||||
// 应用偏移量到物体位置,保持原始Z轴不变
|
||||
transform.position = _originalPosition + new Vector3(xOffset, yOffset, 0);
|
||||
transform.localPosition = _originalPosition + new Vector3(xOffset, yOffset, 0);
|
||||
|
||||
// 如果达到销毁条件,在完成最后一帧动画更新后销毁物体
|
||||
if (shouldDestroy)
|
||||
|
Reference in New Issue
Block a user