[Refactor] Replace [SerializeField] + getter with [field: SerializeField] auto-properties
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,17 +7,14 @@ namespace YachtDice.Modifiers.Definition
|
||||
{
|
||||
public abstract class Effect : ScriptableObject, IEffect
|
||||
{
|
||||
[SerializeField] private ModifierPhase phase = ModifierPhase.Additive;
|
||||
[SerializeField] private int priority;
|
||||
|
||||
public ModifierPhase Phase => phase;
|
||||
public int Priority => priority;
|
||||
[field: SerializeField] public ModifierPhase Phase { get; private set; } = ModifierPhase.Additive;
|
||||
[field: SerializeField] public int Priority { get; private set; }
|
||||
|
||||
public abstract UniTask Apply(ModifierContext context, ModifierInstance instance);
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public void SetPhaseForTest(ModifierPhase p) => phase = p;
|
||||
public void SetPriorityForTest(int p) => priority = p;
|
||||
public void SetPhaseForTest(ModifierPhase p) => Phase = p;
|
||||
public void SetPriorityForTest(int p) => Priority = p;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user