Class EventCondition
Represents a condition that is based on a DataModelEvent
Namespace: Artemis.Core
Assembly: Artemis.Core.dll
Syntax
public class EventCondition : CorePropertyChanged, INodeScriptCondition, ICondition, IDisposable, IStorageModel
Constructors
EventCondition(RenderProfileElement)
Creates a new instance of the EventCondition class
Declaration
public EventCondition(RenderProfileElement profileElement)
Parameters
Type | Name | Description |
---|---|---|
RenderProfileElement | profileElement |
Properties
Entity
Gets the entity used to store this condition
Declaration
public IConditionEntity Entity { get; }
Property Value
Type | Description |
---|---|
IConditionEntity |
EventPath
Gets or sets the path to the event that drives this event condition
Declaration
public DataModelPath? EventPath { get; set; }
Property Value
Type | Description |
---|---|
DataModelPath |
IsMet
Gets a boolean indicating whether the condition is currently met
Declaration
public bool IsMet { get; }
Property Value
Type | Description |
---|---|
bool |
NodeScript
Gets the node script of this node script condition
Declaration
public INodeScript NodeScript { get; }
Property Value
Type | Description |
---|---|
INodeScript |
OverlapMode
Gets or sets how the condition behaves when events trigger before the timeline finishes in the Play event trigger mode.
Declaration
public EventOverlapMode OverlapMode { get; set; }
Property Value
Type | Description |
---|---|
EventOverlapMode |
ProfileElement
Gets the profile element this condition applies to
Declaration
public RenderProfileElement ProfileElement { get; }
Property Value
Type | Description |
---|---|
RenderProfileElement |
Script
Gets the script that drives the event condition
Declaration
public NodeScript<bool> Script { get; }
Property Value
Type | Description |
---|---|
NodeScript<bool> |
ToggleOffMode
Gets or sets the mode for render elements when toggling off the event when using Toggle.
Declaration
public EventToggleOffMode ToggleOffMode { get; set; }
Property Value
Type | Description |
---|---|
EventToggleOffMode |
TriggerMode
Gets or sets how the condition behaves when the event fires.
Declaration
public EventTriggerMode TriggerMode { get; set; }
Property Value
Type | Description |
---|---|
EventTriggerMode |
Methods
Dispose()
Declaration
public void Dispose()
GetStartNode()
Gets the start node of the event script, if any
Declaration
public INode GetStartNode()
Returns
Type | Description |
---|---|
INode | The start node of the event script, if any. |
Load()
Loads the model from its associated entity
Declaration
public void Load()
LoadNodeScript()
Loads the node script this node script condition uses
Declaration
public void LoadNodeScript()
OverrideTimeline(TimeSpan)
Overrides the timeline to the provided position
as the display condition sees fit.
Declaration
public void OverrideTimeline(TimeSpan position)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | position |
Save()
Saves the model to its associated entity
Declaration
public void Save()
Update()
Updates the condition
Declaration
public void Update()
UpdateEventNode(bool)
Updates the event node, applying the selected event
Declaration
public void UpdateEventNode(bool updateScript)
Parameters
Type | Name | Description |
---|---|---|
bool | updateScript |
UpdateTimeline(double)
Updates the timeline according to the provided deltaTime
as the display condition sees fit.
Declaration
public void UpdateTimeline(double deltaTime)
Parameters
Type | Name | Description |
---|---|---|
double | deltaTime |