修改动画回调事件

This commit is contained in:
2026-03-11 09:06:24 +08:00
parent 1f1c603489
commit 40b142235e
9 changed files with 145 additions and 96 deletions

View File

@@ -22,15 +22,56 @@ namespace NBF
#region Rod专属
private bool _stretchRope;
public bool StretchRope
{
get => _stretchRope;
set
{
_stretchRope = value;
Scene.EventComponent.Publish(new PlayerItemRodLingChangeEvent
{
Item = this
});
}
}
private float _lineLength = 5f;
/// <summary>
/// 线长度
/// </summary>
public float LineLength = 1.5f;
public float LineLength
{
get => _lineLength;
set
{
_lineLength = value;
Scene.EventComponent.Publish(new PlayerItemRodLingChangeEvent
{
Item = this
});
}
}
private float _floatLength = 0.3f;
/// <summary>
/// 浮漂线长度
/// </summary>
public float FloatLength = 0.5f;
public float FloatLength
{
get => _floatLength;
set
{
_floatLength = value;
Scene.EventComponent.Publish(new PlayerItemRodLingChangeEvent
{
Item = this
});
}
}
private float _tension;
@@ -40,13 +81,17 @@ namespace NBF
public float Tension
{
get => _tension;
private set
set
{
if (!Mathf.Approximately(_tension, value))
{
_tension = value;
// OnTensionChanged?.Invoke(_tension);
}
Scene.EventComponent.Publish(new PlayerItemRodLingChangeEvent
{
Item = this
});
}
}