Class AppliedEffect
- Namespace
- SurvivorsMaker.Core
- Assembly
- SurvivorsMaker.Core.dll
Record of one apply, holding what Undo(AppliedEffect, EffectStore) needs. The previous value of a Set lives here, not on the effect, so the same effect can be applied more than once and still undo cleanly.
public sealed class AppliedEffect
- Inheritance
-
AppliedEffect
- Inherited Members
Constructors
AppliedEffect(Effect, bool, int, IEffectHandler, object)
public AppliedEffect(Effect effect, bool applied, int previous = 0, IEffectHandler handler = null, object state = null)
Parameters
effectEffectappliedboolpreviousinthandlerIEffectHandlerstateobject
Fields
Applied
public readonly bool Applied
Field Value
Captured
public float Captured
Field Value
Effect
public readonly Effect Effect
Field Value
EffectIndex
public int EffectIndex
Field Value
Handler
Handler that applied a custom effect, so undo goes to the same one.
public readonly IEffectHandler Handler
Field Value
HasCapture
public bool HasCapture
Field Value
InstanceId
public long InstanceId
Field Value
Previous
Value of the target before a Set.
public readonly int Previous
Field Value
RemainingTicks
public int RemainingTicks
Field Value
StartWave
public int StartWave
Field Value
State
Anything a custom handler wants back at undo time.
public readonly object State
Field Value
Methods
Skipped(Effect)
Creates a token recording an effect that did not apply; undo has no work for this token.
public static AppliedEffect Skipped(Effect effect)
Parameters
effectEffect