fiore 13588aa693 [feat] 슬로우 디버프 마법 생성
- 몬스터 에셋 적용
- 슬로우 마법 기능 추가

Work in JIRA ISSUE DEG-100
2025-05-01 15:03:23 +09:00

31 lines
808 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)
{
if (target is PlayerController pc)
{
pc.moveSpeed *= _slowMultiplier;
Debug.Log($"{target.characterName}에게 이동 속도 감소 적용됨");
}
}
public override void RemoveEffect(CharacterBase target)
{
if (target is PlayerController pc)
{
pc.moveSpeed /= _slowMultiplier;
Debug.Log($"{target.characterName}의 이동 속도 회복됨");
}
}
}