Class Trigger
- Namespace
- FrameOfReference.World.Positionables
- Assembly
- FrameOfReference.World.dll
Executes Lua scripts on proximity or timers.
public sealed class Trigger : Positionable<Vector2>, ICloneable, IChangeNotify<Positionable<Vector2>>
- Inheritance
-
Positionable<Vector2>Trigger
- Implements
- Inherited Members
- Extension Methods
Properties
DependsOn
The name of another Trigger that has to be triggered before this one can be.
public string? DependsOn { get; set; }
Property Value
DueTime
The GameTime by which this trigger should have been activated.
public double DueTime { get; set; }
Property Value
OnActivation
A Lua script to execute when TargetEntity gets within Range.
[FileType("Lua")]
public string? OnActivation { get; set; }
Property Value
OnTimeout
A Lua script to execute if the trigger was not activated by DueTime.
[FileType("Lua")]
public string? OnTimeout { get; set; }
Property Value
Range
The maximum distance at which an Entity activates this trigger.
public float Range { get; set; }
Property Value
TargetEntity
The name of the Entity whose proximity causes this trigger to activate.
public string? TargetEntity { get; set; }
Property Value
WasTriggered
Indicates whether this trigger has already been triggered by TargetEntity or has timed out.
public bool WasTriggered { get; set; }
Property Value
Methods
IsInRange(Positionable<Vector2>)
Determines whether an entity is within range of this trigger.
public bool IsInRange(Positionable<Vector2> entity)
Parameters
entity
Positionable<Vector2>