Contents
Interface EventCondition.Config
- All Known Implementing Classes:
EnterInstanceTeleporterCondition.Config, EnterPortalCondition.Config, EventEndCondition.Config, GameFlagLevelCondition.Config, IntervalCondition.Config, LocationCondition.Config, NoCondition.Config, ProximityCondition.Config, SignalCondition.Config, TimeCondition.Config, WorldClosedCondition.Config
- Enclosing interface:
EventCondition
public static interface EventCondition.Config
Asset-side factory for an
EventCondition. Decoded from JSON at asset-load time and
called at runtime to produce live condition instances.
Implementations are typically inner classes of the condition they create, named
Config, and hold the immutable configuration fields decoded from the asset file.
The mutable runtime state lives in the EventCondition instance returned by
create().
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ArrayCodec<EventCondition.Config> static final EventCondition.Config[]static final CodecMapCodec<EventCondition.Config> -
Method Summary
Modifier and TypeMethodDescriptioncreate()Creates a new live condition instance from this config.default voidCalled at asset-load time so the config can register anyContextKeyvalues it references and perform any other validation of the configuration.
-
Field Details
-
TYPE_CODEC
-
ARRAY_CODEC
-
EMPTY_ARRAY
-
-
Method Details
-
create
Creates a new live condition instance from this config. Called once per stage start.- Returns:
- a fresh, unstarted condition ready to be submitted to the
ConditionManager
-
validate
Called at asset-load time so the config can register anyContextKeyvalues it references and perform any other validation of the configuration.- Parameters:
validator- the validator to register key references with
-