Barotrauma Client
Loading...
Searching...
No Matches
Barotrauma.CombatAction Class Reference

Makes an NPC switch to a combat state (with options for different kinds of behaviors, such as offensive, arresting or retreating). More...

Inheritance diagram for Barotrauma.CombatAction:
Barotrauma.EventAction

Public Member Functions

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

Properties

AIObjectiveCombat.CombatMode CombatMode [get, set]
 
bool IsInstigator [get, set]
 
AIObjectiveCombat.CombatMode GuardReaction [get, set]
 
AIObjectiveCombat.CombatMode WitnessReaction [get, set]
 
Identifier NPCTag [get, set]
 
Identifier EnemyTag [get, set]
 
float CoolDown [get, set]
 

Additional Inherited Members

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

Detailed Description

Makes an NPC switch to a combat state (with options for different kinds of behaviors, such as offensive, arresting or retreating).

Constructor & Destructor Documentation

◆ CombatAction()

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

Member Function Documentation

◆ IsFinished()

override bool Barotrauma.CombatAction.IsFinished ( ref string goTo)

◆ Reset()

override void Barotrauma.CombatAction.Reset ( )

◆ ToDebugString()

override string Barotrauma.CombatAction.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.
Definition CombatAction.cs:99
Returns

Reimplemented from Barotrauma.EventAction.

◆ Update()

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

Reimplemented from Barotrauma.EventAction.

Property Documentation

◆ CombatMode

AIObjectiveCombat.CombatMode Barotrauma.CombatAction.CombatMode
getset

◆ CoolDown

float Barotrauma.CombatAction.CoolDown
getset

◆ EnemyTag

Identifier Barotrauma.CombatAction.EnemyTag
getset

◆ GuardReaction

AIObjectiveCombat.CombatMode Barotrauma.CombatAction.GuardReaction
getset

◆ IsInstigator

bool Barotrauma.CombatAction.IsInstigator
getset

◆ NPCTag

Identifier Barotrauma.CombatAction.NPCTag
getset

◆ WitnessReaction

AIObjectiveCombat.CombatMode Barotrauma.CombatAction.WitnessReaction
getset

The documentation for this class was generated from the following file: