Barotrauma Server
Loading...
Searching...
No Matches
Barotrauma.AITarget Class Reference

Public Types

enum  TargetType { Any , HumanOnly , EnemyOnly }
 

Public Member Functions

bool ShouldBeIgnored ()
 Is some condition met (e.g. entity null, indetectable, outside level) that prevents anyone from detecting the target?
 
 AITarget (Entity e, XElement element)
 
 AITarget (Entity e)
 
void Update (float deltaTime)
 
void IncreaseSoundRange (float deltaTime, float speed=1)
 
void IncreaseSightRange (float deltaTime, float speed=1)
 
void DecreaseSoundRange (float deltaTime, float speed=1)
 
void DecreaseSightRange (float deltaTime, float speed=1)
 
bool HasSector ()
 
bool IsWithinSector (Vector2 worldPosition)
 
void Remove ()
 
void Reset ()
 

Public Attributes

LocalizedString SonarLabel
 
Identifier SonarIconIdentifier
 
double InDetectableSetTime
 
float MinSoundRange
 
float MinSightRange
 
float MaxSoundRange = 100000
 
float MaxSightRange = 100000
 

Static Public Attributes

static List< AITargetList = new List<AITarget>()
 

Properties

Entity Entity [get]
 
float FadeOutTime = 2 [get]
 How long does it take for the ai target to fade out if not kept alive.
 
bool Static [get]
 
bool StaticSound [get]
 
bool StaticSight [get]
 
float SoundRange [get, set]
 
float SightRange [get, set]
 
float SectorDegrees [get, set]
 
Vector2 SectorDir [get, set]
 
float SonarDisruption [get, set]
 
bool InDetectable [get, set]
 Should be reset to false each frame and kept indetectable by e.g. a status effect.
 
bool NeedsUpdate = true [get]
 Does the AI target do something that requires Update() to be called (e.g. static targets don't need to be updated)
 
TargetType Type [get]
 
Vector2 WorldPosition [get]
 
Vector2 SimPosition [get]
 

Member Enumeration Documentation

◆ TargetType

Enumerator
Any 
HumanOnly 
EnemyOnly 

Constructor & Destructor Documentation

◆ AITarget() [1/2]

Barotrauma.AITarget.AITarget ( Entity e,
XElement element )

◆ AITarget() [2/2]

Barotrauma.AITarget.AITarget ( Entity e)

Member Function Documentation

◆ DecreaseSightRange()

void Barotrauma.AITarget.DecreaseSightRange ( float deltaTime,
float speed = 1 )

◆ DecreaseSoundRange()

void Barotrauma.AITarget.DecreaseSoundRange ( float deltaTime,
float speed = 1 )

◆ HasSector()

bool Barotrauma.AITarget.HasSector ( )

◆ IncreaseSightRange()

void Barotrauma.AITarget.IncreaseSightRange ( float deltaTime,
float speed = 1 )

◆ IncreaseSoundRange()

void Barotrauma.AITarget.IncreaseSoundRange ( float deltaTime,
float speed = 1 )

◆ IsWithinSector()

bool Barotrauma.AITarget.IsWithinSector ( Vector2 worldPosition)

◆ Remove()

void Barotrauma.AITarget.Remove ( )

◆ Reset()

void Barotrauma.AITarget.Reset ( )

◆ ShouldBeIgnored()

bool Barotrauma.AITarget.ShouldBeIgnored ( )

Is some condition met (e.g. entity null, indetectable, outside level) that prevents anyone from detecting the target?

◆ Update()

void Barotrauma.AITarget.Update ( float deltaTime)

Member Data Documentation

◆ InDetectableSetTime

double Barotrauma.AITarget.InDetectableSetTime

◆ List

List<AITarget> Barotrauma.AITarget.List = new List<AITarget>()
static

◆ MaxSightRange

float Barotrauma.AITarget.MaxSightRange = 100000

◆ MaxSoundRange

float Barotrauma.AITarget.MaxSoundRange = 100000

◆ MinSightRange

float Barotrauma.AITarget.MinSightRange

◆ MinSoundRange

float Barotrauma.AITarget.MinSoundRange

◆ SonarIconIdentifier

Identifier Barotrauma.AITarget.SonarIconIdentifier

◆ SonarLabel

LocalizedString Barotrauma.AITarget.SonarLabel

Property Documentation

◆ Entity

Entity Barotrauma.AITarget.Entity
get

◆ FadeOutTime

float Barotrauma.AITarget.FadeOutTime = 2
get

How long does it take for the ai target to fade out if not kept alive.

◆ InDetectable

bool Barotrauma.AITarget.InDetectable
getset

Should be reset to false each frame and kept indetectable by e.g. a status effect.

◆ NeedsUpdate

bool Barotrauma.AITarget.NeedsUpdate = true
get

Does the AI target do something that requires Update() to be called (e.g. static targets don't need to be updated)

◆ SectorDegrees

float Barotrauma.AITarget.SectorDegrees
getset

◆ SectorDir

Vector2 Barotrauma.AITarget.SectorDir
getset

◆ SightRange

float Barotrauma.AITarget.SightRange
getset

◆ SimPosition

Vector2 Barotrauma.AITarget.SimPosition
get

◆ SonarDisruption

float Barotrauma.AITarget.SonarDisruption
getset

◆ SoundRange

float Barotrauma.AITarget.SoundRange
getset

◆ Static

bool Barotrauma.AITarget.Static
get

◆ StaticSight

bool Barotrauma.AITarget.StaticSight
get

◆ StaticSound

bool Barotrauma.AITarget.StaticSound
get

◆ Type

TargetType Barotrauma.AITarget.Type
get

◆ WorldPosition

Vector2 Barotrauma.AITarget.WorldPosition
get

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