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

28 lines
624 B
C#

using UnityEngine;
namespace Gameplay.Buff
{
public class BuffSetBeHitScaleOnDebuffChange : BaseBuff
{
public int oldDebuffCount;
public float perDebuffChange;
public float maxChangeValue;
protected override void _OnInit()
{
base._OnInit();
perDebuffChange = _TryGetFloatParam(0);
maxChangeValue = _TryGetFloatParam(1);
oldDebuffCount = 0;
}
public float GetBeHitScale(int debuffCount)
{
return Mathf.Min(debuffCount * perDebuffChange, maxChangeValue);
}
}
}