NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/Gameplay/Buff/Impl/BuffChangeMoveLevel.cs

32 lines
674 B
C#
Raw Normal View History

2024-01-17 14:31:53 +08:00
namespace Gameplay.Buff
{
public class BuffChangeMoveLevel : BaseBuff
{
private int _moveLevel;
private int _oldMoveLevel;
protected override void _OnInit()
{
base._OnInit();
_moveLevel = _TryGetIntParam(0);
}
protected override void _OnAdd()
{
base._OnAdd();
_oldMoveLevel = owner.commonData.crossLevel;
owner.commonData.crossLevel = _moveLevel;
}
protected override void _OnRemove()
{
base._OnRemove();
owner.commonData.crossLevel = _oldMoveLevel;
}
}
}