Persist stat modifier state in typed snapshots
This commit is contained in:
parent
19fdaab6ab
commit
cd009fa9a9
11 changed files with 90 additions and 8 deletions
|
|
@ -972,6 +972,15 @@ public class ActionGameManager : MonoBehaviour
|
|||
TriggerPulled = trigger.Pulled
|
||||
};
|
||||
}
|
||||
else if (behavior is StatModifier statModifier)
|
||||
{
|
||||
state = new AetheriaRuntimeBehaviorStateCommit
|
||||
{
|
||||
StatModifierApplied = statModifier.Applied,
|
||||
StatModifierExecuted = statModifier.Executed,
|
||||
StatModifierTargetStatCount = statModifier.TargetStatCount
|
||||
};
|
||||
}
|
||||
|
||||
if (state == null)
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -42,6 +42,10 @@ public class StatModifier : Behavior, IInitializableBehavior, IDisposable, IAlwa
|
|||
private bool _applied;
|
||||
private bool _executed;
|
||||
|
||||
public bool Applied => _applied;
|
||||
public bool Executed => _executed;
|
||||
public int TargetStatCount => _stats?.Length ?? 0;
|
||||
|
||||
public StatModifier(StatModifierData data, EquippedItem item) : base(data, item)
|
||||
{
|
||||
_data = data;
|
||||
|
|
|
|||
Loading…
Reference in a new issue