53 lines
2.3 KiB
C#
53 lines
2.3 KiB
C#
using UnityEngine;
|
||
|
||
namespace BrewMonster
|
||
{
|
||
/// <summary>
|
||
/// Link movement (lightning chain - minimal movement, updates GFX params).
|
||
/// Mirrors C++ CGfxLinkMove exactly (A3DSkillGfxEvent2.cpp:324-356).
|
||
/// 链接移动(闪电链 - 最小移动,更新GFX参数),完全镜像C++ CGfxLinkMove。
|
||
/// </summary>
|
||
public class CGfxLinkMove : CGfxMoveBase
|
||
{
|
||
public CGfxLinkMove(GfxMoveMode mode) : base(mode) { }
|
||
|
||
/// <summary>
|
||
/// Initialize link movement (just sets position and direction).
|
||
/// 初始化链接移动(仅设置位置和方向)。
|
||
/// </summary>
|
||
public override void StartMove(Vector3 vHost, Vector3 vTarget)
|
||
{
|
||
m_vPos = vHost;
|
||
Vector3 vDir = vTarget - vHost;
|
||
m_vMoveDir = vDir.normalized;
|
||
}
|
||
|
||
/// <summary>
|
||
/// Tick link movement (always returns false - hit triggered by timeout).
|
||
/// 更新链接移动(始终返回false - 命中由超时触发)。
|
||
/// </summary>
|
||
public override bool TickMove(uint dwDeltaTime, Vector3 vHostPos, Vector3 vTargetPos)
|
||
{
|
||
// Link movement doesn't actually move - it's handled by UpdateGfxParam
|
||
// 链接移动实际上不移动 - 由UpdateGfxParam处理
|
||
return false;
|
||
}
|
||
|
||
/// <summary>
|
||
/// Update GFX parameters for link effect (host and target positions).
|
||
/// Note: In Unity, this would be called from the event system to update particle system parameters.
|
||
/// 更新链接效果的GFX参数(施法者和目标位置)。
|
||
/// 注意:在Unity中,这将从事件系统调用以更新粒子系统参数。
|
||
/// </summary>
|
||
public virtual void UpdateGfxParam(Vector3 vHost, Vector3 vTarget)
|
||
{
|
||
// In C++, this updates A3DGFXEx parameters (ID_PARAM_LTN_POS1, ID_PARAM_LTN_POS2)
|
||
// In Unity, this would update particle system start/end positions
|
||
// 在C++中,这更新A3DGFXEx参数(ID_PARAM_LTN_POS1, ID_PARAM_LTN_POS2)
|
||
// 在Unity中,这将更新粒子系统的起始/结束位置
|
||
// Implementation depends on how Unity particle systems handle link effects
|
||
// 实现取决于Unity粒子系统如何处理链接效果
|
||
}
|
||
}
|
||
}
|