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

effect Effect
applied bool
previous int
handler IEffectHandler
state object

Fields

Applied

public readonly bool Applied

Field Value

bool

Captured

public float Captured

Field Value

float

Effect

public readonly Effect Effect

Field Value

Effect

EffectIndex

public int EffectIndex

Field Value

int

Handler

Handler that applied a custom effect, so undo goes to the same one.

public readonly IEffectHandler Handler

Field Value

IEffectHandler

HasCapture

public bool HasCapture

Field Value

bool

InstanceId

public long InstanceId

Field Value

long

Previous

Value of the target before a Set.

public readonly int Previous

Field Value

int

RemainingTicks

public int RemainingTicks

Field Value

int

StartWave

public int StartWave

Field Value

int

State

Anything a custom handler wants back at undo time.

public readonly object State

Field Value

object

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

effect Effect

Returns

AppliedEffect