Restore behavior runtime state from typed Continue
This commit is contained in:
parent
c8b58fa44f
commit
01fc810eb4
23 changed files with 406 additions and 13 deletions
|
|
@ -125,6 +125,17 @@ public class StatModifier : Behavior, IInitializableBehavior, IDisposable, IAlwa
|
|||
RemoveModifier();
|
||||
_executed = false;
|
||||
}
|
||||
|
||||
public void RestoreRuntimeState(bool applied, bool executed)
|
||||
{
|
||||
if (_stats == null)
|
||||
Initialize();
|
||||
if (applied && !_applied)
|
||||
ApplyModifier();
|
||||
if (!applied && _applied)
|
||||
RemoveModifier();
|
||||
_executed = executed;
|
||||
}
|
||||
}
|
||||
|
||||
public enum StatModifierType
|
||||
|
|
|
|||
Loading…
Reference in a new issue