Table of Contents

Class EntityClassChangedContext

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

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

public class EntityClassChangedContext : IHasTarget, IHasEntity
Inheritance
object
EntityClassChangedContext
Implements

Constructors

EntityClassChangedContext(EntityCore, ClassSO, ClassSO)

Initializes a new instance of EntityClassChangedContext.

public EntityClassChangedContext(EntityCore target, ClassSO previousClass, ClassSO newClass)

Parameters

target EntityCore

The entity whose class changed, or null when the EntityClass component raising the change has no EntityCore sibling.

previousClass ClassSO

The class before the change.

newClass ClassSO

The class after the change.

Properties

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

NewClass

The class assigned to the entity after the change happened.

public ClassSO NewClass { get; }

Property Value

ClassSO

PreviousClass

The class assigned to the entity before the change happened.

public ClassSO PreviousClass { get; }

Property Value

ClassSO

Target

public EntityCore Target { get; }

Property Value

EntityCore