fiore 32b3cb918a [Feat] 넉백 기능 구현
- 플레이어가 PlayerController를 사용한다고 가정하고 넉백 구현

Work in JIRA ISSUE DEG-100
2025-05-02 11:51:24 +09:00

26 lines
675 B
C#

using UnityEngine;
public class SlowDebuff : StatusEffect
{
private float _slowMultiplier;
public SlowDebuff(float duration, float slowMultiplier)
{
this.effectName = "Slow";
this.duration = duration;
_slowMultiplier = slowMultiplier;
}
public override void ApplyEffect(CharacterBase target)
{
target.moveSpeed *= _slowMultiplier;
Debug.Log($"{target.characterName}에게 이동 속도 감소 적용됨");
}
public override void RemoveEffect(CharacterBase target)
{
target.moveSpeed /= _slowMultiplier;
Debug.Log($"{target.characterName}의 이동 속도 회복됨");
}
}