Barotrauma Client Doc
Barotrauma.TriggerAction Class Reference
Inheritance diagram for Barotrauma.TriggerAction:
Barotrauma.EventAction

Public Types

enum class  TriggerType { Inside , Outside }
 

Public Member Functions

 TriggerAction (ScriptedEvent parentEvent, ContentXElement element)
 
override bool IsFinished (ref string goTo)
 Has the action finished. More...
 
override void Reset ()
 
override void Update (float deltaTime)
 
override string ToDebugString ()
 Rich test to display in debugdraw More...
 
- Public Member Functions inherited from Barotrauma.EventAction
 EventAction (ScriptedEvent parentEvent, ContentXElement element)
 
virtual bool SetGoToTarget (string goTo)
 
virtual bool CanBeFinished ()
 
virtual IEnumerable< EventActionGetSubActions ()
 

Public Attributes

bool isRunning = false
 
- Public Attributes inherited from Barotrauma.EventAction
readonly ScriptedEvent ParentEvent
 

Properties

Identifier Target1Tag [get, set]
 
Identifier Target2Tag [get, set]
 
Identifier TargetModuleType [get, set]
 
Identifier ApplyToTarget1 [get, set]
 
Identifier ApplyToTarget2 [get, set]
 
TriggerType Type [get, set]
 
float Radius [get, set]
 
bool DisableInCombat [get, set]
 
bool DisableIfTargetIncapacitated [get, set]
 
bool WaitForInteraction [get, set]
 
bool AllowMultipleTargets [get, set]
 
bool CheckAllTargets [get, set]
 
bool SelectOnTrigger [get, set]
 

Additional Inherited Members

- Static Public Member Functions inherited from Barotrauma.EventAction
static EventAction Instantiate (ScriptedEvent scriptedEvent, ContentXElement element)
 
- Protected Member Functions inherited from Barotrauma.EventAction
void ApplyTagsToHulls (Entity entity, Identifier hullTag, Identifier linkedHullTag)
 

Detailed Description

Definition at line 8 of file TriggerAction.cs.

Member Enumeration Documentation

◆ TriggerType

Enumerator
Inside 
Outside 

Definition at line 10 of file TriggerAction.cs.

Constructor & Destructor Documentation

◆ TriggerAction()

Barotrauma.TriggerAction.TriggerAction ( ScriptedEvent  parentEvent,
ContentXElement  element 
)

Definition at line 57 of file TriggerAction.cs.

Member Function Documentation

◆ IsFinished()

override bool Barotrauma.TriggerAction.IsFinished ( ref string  goToLabel)
virtual

Has the action finished.

Parameters
goToLabelIf null or empty, the event moves to the next action. Otherwise it moves to the specified label.
Returns

Implements Barotrauma.EventAction.

Definition at line 60 of file TriggerAction.cs.

◆ Reset()

override void Barotrauma.TriggerAction.Reset ( )
virtual

Implements Barotrauma.EventAction.

Definition at line 64 of file TriggerAction.cs.

◆ ToDebugString()

override string Barotrauma.TriggerAction.ToDebugString ( )
virtual

Rich test to display in debugdraw

public override string ToDebugString()
{
return $"{ToolBox.GetDebugSymbol(isFinished)} SomeAction -> "(someInfo: {info.ColorizeObject()})";
}
override string ToDebugString()
Rich test to display in debugdraw
Returns

Reimplemented from Barotrauma.EventAction.

Definition at line 398 of file TriggerAction.cs.

◆ Update()

override void Barotrauma.TriggerAction.Update ( float  deltaTime)
virtual

Reimplemented from Barotrauma.EventAction.

Definition at line 77 of file TriggerAction.cs.

Member Data Documentation

◆ isRunning

bool Barotrauma.TriggerAction.isRunning = false

Definition at line 71 of file TriggerAction.cs.

Property Documentation

◆ AllowMultipleTargets

bool Barotrauma.TriggerAction.AllowMultipleTargets
getset

Definition at line 47 of file TriggerAction.cs.

◆ ApplyToTarget1

Identifier Barotrauma.TriggerAction.ApplyToTarget1
getset

Definition at line 26 of file TriggerAction.cs.

◆ ApplyToTarget2

Identifier Barotrauma.TriggerAction.ApplyToTarget2
getset

Definition at line 29 of file TriggerAction.cs.

◆ CheckAllTargets

bool Barotrauma.TriggerAction.CheckAllTargets
getset

Definition at line 50 of file TriggerAction.cs.

◆ DisableIfTargetIncapacitated

bool Barotrauma.TriggerAction.DisableIfTargetIncapacitated
getset

Definition at line 41 of file TriggerAction.cs.

◆ DisableInCombat

bool Barotrauma.TriggerAction.DisableInCombat
getset

Definition at line 38 of file TriggerAction.cs.

◆ Radius

float Barotrauma.TriggerAction.Radius
getset

Definition at line 35 of file TriggerAction.cs.

◆ SelectOnTrigger

bool Barotrauma.TriggerAction.SelectOnTrigger
getset

Definition at line 53 of file TriggerAction.cs.

◆ Target1Tag

Identifier Barotrauma.TriggerAction.Target1Tag
getset

Definition at line 17 of file TriggerAction.cs.

◆ Target2Tag

Identifier Barotrauma.TriggerAction.Target2Tag
getset

Definition at line 20 of file TriggerAction.cs.

◆ TargetModuleType

Identifier Barotrauma.TriggerAction.TargetModuleType
getset

Definition at line 23 of file TriggerAction.cs.

◆ Type

TriggerType Barotrauma.TriggerAction.Type
getset

Definition at line 32 of file TriggerAction.cs.

◆ WaitForInteraction

bool Barotrauma.TriggerAction.WaitForInteraction
getset

Definition at line 44 of file TriggerAction.cs.