Table of Contents

Class EntityLevelChangedContext

Namespace
ElectricDrill.AstraRpgFramework.Events.Contexts
Assembly
com.electricdrill.astra-rpg-framework.Runtime.dll

Payload describing an entity level change event. Exposes the leveled entity both as a generic payload entity and as the payload target.

public class EntityLevelChangedContext : IHasTarget, IHasEntity, IHasValueChange<int>
Inheritance
object
EntityLevelChangedContext
Implements

Constructors

EntityLevelChangedContext(EntityCore, int, int)

Initializes a new instance of EntityLevelChangedContext.

public EntityLevelChangedContext(EntityCore target, int previousValue, int newValue)

Parameters

target EntityCore

The entity whose level changed.

previousValue int

The level before the change.

newValue int

The level after the change.

Properties

AbsAmount

The absolute amount of change between PreviousValue and NewValue.

public int AbsAmount { get; }

Property Value

int

Entity

The primary EntityCore associated with this object. For entity components this is the owning entity; for context payloads this is the primary affected subject (e.g. the event target).

public EntityCore Entity { get; }

Property Value

EntityCore

NewValue

The level value after the change happened.

public int NewValue { get; }

Property Value

int

PreviousValue

The level value before the change happened.

public int PreviousValue { get; }

Property Value

int

Target

public EntityCore Target { get; }

Property Value

EntityCore