Struct StatModifier
단일 Stat 수정자. Effect 가 적용/제거될 때 StatCollection 에 추가/삭제한다. Effect 는 Stat 을 직접 수정하지 않는다 — Modifier 를 통해서만 수정한다.
public readonly struct StatModifier
Constructors
StatModifier(StatModifierType, float, string, int)
public StatModifier(StatModifierType type, float value, string source = "", int priority = 0)
Parameters
typeStatModifierTypevaluefloatsourcestringpriorityint
Properties
Priority
같은 타입 내 적용 순서. 낮을수록 먼저 적용. 기본 0.
public int Priority { get; }
Property Value
- int
Source
Modifier 출처 식별자 (Effect ID, Skill ID 등). 제거 시 사용.
public string Source { get; }
Property Value
- string
Type
적용 방식.
public StatModifierType Type { get; }
Property Value
Value
수정 값. Multiply 타입이면 승수(1.5 = 50% 증가).
public float Value { get; }
Property Value
- float
Methods
Equals(StatModifier)
public bool Equals(StatModifier other)
Parameters
otherStatModifier
Returns
- bool
Equals(object)
public override bool Equals(object obj)
Parameters
objobject
Returns
- bool
GetHashCode()
public override int GetHashCode()
Returns
- int