24 lines
696 B
C#
24 lines
696 B
C#
using Cysharp.Threading.Tasks;
|
|
using UnityEngine;
|
|
using YachtDice.Modifiers.Core;
|
|
using YachtDice.Modifiers.Runtime;
|
|
|
|
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;
|
|
|
|
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;
|
|
#endif
|
|
}
|
|
}
|