Class EventCondition
Represents a condition that is based on a DataModelEvent
public class EventCondition : CorePropertyChanged, INodeScriptCondition, ICondition, IDisposable, IStorageModel, IPluginFeatureDependent
- Inheritance
-
objectCorePropertyChangedEventCondition
- Implements
Constructors
EventCondition(RenderProfileElement)
Creates a new instance of the EventCondition class
public EventCondition(RenderProfileElement profileElement)
Parameters
profileElementRenderProfileElement
Properties
Entity
Gets the entity used to store this condition
public IConditionEntity Entity { get; }
Property Value
- IConditionEntity
EventPath
Gets or sets the path to the event that drives this event condition
public DataModelPath? EventPath { get; set; }
Property Value
IsMet
Gets a boolean indicating whether the condition is currently met
public bool IsMet { get; }
Property Value
NodeScript
Gets the node script of this node script condition
public INodeScript NodeScript { get; }
Property Value
OverlapMode
Gets or sets how the condition behaves when events trigger before the timeline finishes in the Play event trigger mode.
public EventOverlapMode OverlapMode { get; set; }
Property Value
ProfileElement
Gets the profile element this condition applies to
public RenderProfileElement ProfileElement { get; }
Property Value
Script
Gets the script that drives the event condition
public NodeScript<bool> Script { get; }
Property Value
ToggleOffMode
Gets or sets the mode for render elements when toggling off the event when using Toggle.
public EventToggleOffMode ToggleOffMode { get; set; }
Property Value
TriggerMode
Gets or sets how the condition behaves when the event fires.
public EventTriggerMode TriggerMode { get; set; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
GetFeatureDependencies()
Gets the plugin features this class depends on, may contain the same plugin feature twice if depending on it in multiple ways.
public IEnumerable<PluginFeature> GetFeatureDependencies()
Returns
- IEnumerable<PluginFeature>
A List<T> of PluginFeature this class depends on.
GetStartNode()
Gets the start node of the event script, if any
public INode GetStartNode()
Returns
- INode
The start node of the event script, if any.
Load()
Loads the model from its associated entity
public void Load()
LoadNodeScript()
Loads the node script this node script condition uses
public void LoadNodeScript()
OverrideTimeline(TimeSpan)
Overrides the timeline to the provided position as the display condition sees fit.
public void OverrideTimeline(TimeSpan position)
Parameters
positionTimeSpan
Save()
Saves the model to its associated entity
public void Save()
Update()
Updates the condition
public void Update()
UpdateEventNode(bool)
Updates the event node, applying the selected event
public void UpdateEventNode(bool updateScript)
Parameters
updateScriptbool
UpdateTimeline(double)
Updates the timeline according to the provided deltaTime as the display condition sees fit.
public void UpdateTimeline(double deltaTime)
Parameters
deltaTimedouble