Barotrauma Client
Loading...
Searching...
No Matches
Barotrauma.EnemyAIController Class Reference
Inheritance diagram for Barotrauma.EnemyAIController:
Barotrauma.AIController Barotrauma.ISteerable

Public Member Functions

bool IsBeingChasedBy (Character c)
 
 EnemyAIController (Character c, string seed)
 
override void SelectTarget (AITarget target)
 
void SelectTarget (AITarget target, float priority)
 
override void Update (float deltaTime)
 
void AimRangedAttack (Attack attack, ISpatialEntity targetEntity)
 
override void OnAttacked (Character attacker, AttackResult attackResult)
 
AITarget UpdateTargets (out CharacterParams.TargetParams targetingParams)
 
void IgnoreTarget (AITarget target)
 
void LaunchTrigger (StatusEffect.AITrigger trigger)
 
void ReevaluateAttacks ()
 
override bool SteerThroughGap (Structure wall, WallSection section, Vector2 targetWorldPos, float deltaTime)
 
override bool SteerThroughGap (Gap gap, Vector2 targetWorldPos, float deltaTime, float maxDistance=-1)
 
bool CanPassThroughHole (Structure wall, int sectionIndex)
 
override bool Escape (float deltaTime)
 
Limb GetTargetLimb (Limb attackLimb, Character target, LimbType targetLimbType=LimbType.None)
 
- Public Member Functions inherited from Barotrauma.AIController
bool HasValidPath (bool requireNonDirty=true, bool requireUnfinished=true, Func< WayPoint, bool > nodePredicate=null)
 Is the current path valid, using the provided parameters.
 
 AIController (Character c)
 
virtual void OnHealed (Character healer, float healAmount)
 
virtual void Reset ()
 
void FaceTarget (ISpatialEntity target)
 
bool CanPassThroughHole (Structure wall, int sectionIndex, int requiredHoleCount)
 
bool TakeItem (Item item, CharacterInventory targetInventory, bool equip, bool wear=false, bool dropOtherIfCannotMove=true, bool allowSwapping=false, bool storeUnequipped=false, IEnumerable< Identifier > targetTags=null)
 
void UnequipEmptyItems (Item parentItem, bool avoidDroppingInSea=true)
 
void UnequipContainedItems (Item parentItem, Func< Item, bool > predicate=null, bool avoidDroppingInSea=true, int? unequipMax=null)
 
void ReequipUnequipped ()
 
bool Escape (float deltaTime)
 
void ResetEscape ()
 

Static Public Member Functions

static bool IsTargetBeingChasedBy (Character target, Character character)
 
static bool IsLatchedTo (Character target, Character character)
 
static bool IsLatchedToSomeoneElse (Character target, Character character)
 
- Static Public Member Functions inherited from Barotrauma.AIController
static void UnequipEmptyItems (Character character, Item parentItem, bool avoidDroppingInSea=true)
 
static void UnequipContainedItems (Character character, Item parentItem, Func< Item, bool > predicate, bool avoidDroppingInSea=true, int? unequipMax=null)
 

Public Attributes

bool TargetOutposts
 Enable the character to attack the outposts and the characters inside them. Disabled by default in normal levels, enabled in outpost levels.
 
- Public Attributes inherited from Barotrauma.AIController
bool Enabled
 
readonly Character Character
 

Static Public Attributes

static bool DisableEnemyAI
 

Protected Member Functions

override void OnTargetChanged (AITarget previousTarget, AITarget newTarget)
 
override void OnStateChanged (AIState from, AIState to)
 
- Protected Member Functions inherited from Barotrauma.AIController
void ResetAITarget ()
 
bool IsWallDisabled (Structure wall)
 
bool UpdateEscape (float deltaTime, bool canAttackDoors)
 

Properties

AIState State [get, set]
 
AIState PreviousState [get]
 
float CombatStrength [get]
 
Limb AttackLimb [get]
 
Attack ActiveAttack [get]
 
AITargetMemory SelectedTargetMemory [get]
 
bool CanAttackDoors [get]
 
float PriorityFearIncrement [get]
 
LatchOntoAI LatchOntoAI [get]
 
SwarmBehavior SwarmBehavior [get]
 
PetBehavior PetBehavior [get]
 
CharacterParams.TargetParams SelectedTargetingParams [get]
 
bool AttackHumans [get]
 
bool AttackRooms [get]
 
override CanEnterSubmarine CanEnterSubmarine [get]
 
override bool CanFlip [get]
 
HashSet< SubmarineUnattackableSubmarines = new HashSet<Submarine>() [get]
 The monster won't try to damage these submarines.
 
bool Reverse [get]
 
CharacterParams.AIParams AIParams [get]
 Shorthand for Character.Params.AI with null checking.
 
- Properties inherited from Barotrauma.AIController
AITarget SelectedAiTarget [get, protected set]
 
SteeringManager SteeringManager [get]
 
Vector2 Steering [get, set]
 
Vector2 SimPosition [get]
 
Vector2 WorldPosition [get]
 
Vector2 Velocity [get]
 
virtual CanEnterSubmarine CanEnterSubmarine [get]
 
virtual bool CanFlip [get]
 
virtual bool IsMentallyUnstable [get]
 
IEnumerable< HullVisibleHulls [get]
 Returns hulls that are visible to the character, including the current hull. Note that this is not an accurate visibility check, it only checks for open gaps between the adjacent and linked hulls.
 
bool IsCurrentPathNullOrUnreachable [get]
 
bool IsCurrentPathUnreachable [get]
 
bool IsCurrentPathFinished [get]
 
bool IsSteeringThroughGap [get, protected set]
 
bool IsTryingToSteerThroughGap [get, protected set]
 
Gap EscapeTarget [get]
 
- Properties inherited from Barotrauma.ISteerable

Additional Inherited Members

- Protected Attributes inherited from Barotrauma.AIController
AITarget _lastAiTarget
 
AITarget _previousAiTarget
 
AITarget _selectedAiTarget
 
SteeringManager steeringManager
 
readonly float colliderWidth
 
readonly float minGapSize
 
readonly float colliderLength
 
readonly float avoidLookAheadDistance
 
bool allGapsSearched
 
readonly HashSet< GapunreachableGaps = new HashSet<Gap>()
 

Constructor & Destructor Documentation

◆ EnemyAIController()

Barotrauma.EnemyAIController.EnemyAIController ( Character c,
string seed )

Member Function Documentation

◆ AimRangedAttack()

void Barotrauma.EnemyAIController.AimRangedAttack ( Attack attack,
ISpatialEntity targetEntity )

◆ CanPassThroughHole()

bool Barotrauma.EnemyAIController.CanPassThroughHole ( Structure wall,
int sectionIndex )

◆ Escape()

override bool Barotrauma.EnemyAIController.Escape ( float deltaTime)

◆ GetTargetLimb()

Limb Barotrauma.EnemyAIController.GetTargetLimb ( Limb attackLimb,
Character target,
LimbType targetLimbType = LimbType::None )

◆ IgnoreTarget()

void Barotrauma.EnemyAIController.IgnoreTarget ( AITarget target)

◆ IsBeingChasedBy()

bool Barotrauma.EnemyAIController.IsBeingChasedBy ( Character c)

◆ IsLatchedTo()

static bool Barotrauma.EnemyAIController.IsLatchedTo ( Character target,
Character character )
static

◆ IsLatchedToSomeoneElse()

static bool Barotrauma.EnemyAIController.IsLatchedToSomeoneElse ( Character target,
Character character )
static

◆ IsTargetBeingChasedBy()

static bool Barotrauma.EnemyAIController.IsTargetBeingChasedBy ( Character target,
Character character )
static

◆ LaunchTrigger()

void Barotrauma.EnemyAIController.LaunchTrigger ( StatusEffect.AITrigger trigger)

◆ OnAttacked()

override void Barotrauma.EnemyAIController.OnAttacked ( Character attacker,
AttackResult attackResult )
virtual

Reimplemented from Barotrauma.AIController.

◆ OnStateChanged()

override void Barotrauma.EnemyAIController.OnStateChanged ( AIState from,
AIState to )
protectedvirtual

Reimplemented from Barotrauma.AIController.

◆ OnTargetChanged()

override void Barotrauma.EnemyAIController.OnTargetChanged ( AITarget previousTarget,
AITarget newTarget )
protectedvirtual

Reimplemented from Barotrauma.AIController.

◆ ReevaluateAttacks()

void Barotrauma.EnemyAIController.ReevaluateAttacks ( )

◆ SelectTarget() [1/2]

override void Barotrauma.EnemyAIController.SelectTarget ( AITarget target)
virtual

Reimplemented from Barotrauma.AIController.

◆ SelectTarget() [2/2]

void Barotrauma.EnemyAIController.SelectTarget ( AITarget target,
float priority )

◆ SteerThroughGap() [1/2]

override bool Barotrauma.EnemyAIController.SteerThroughGap ( Gap gap,
Vector2 targetWorldPos,
float deltaTime,
float maxDistance = -1 )
virtual

Reimplemented from Barotrauma.AIController.

◆ SteerThroughGap() [2/2]

override bool Barotrauma.EnemyAIController.SteerThroughGap ( Structure wall,
WallSection section,
Vector2 targetWorldPos,
float deltaTime )
virtual

Reimplemented from Barotrauma.AIController.

◆ Update()

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

Reimplemented from Barotrauma.AIController.

◆ UpdateTargets()

AITarget Barotrauma.EnemyAIController.UpdateTargets ( out CharacterParams.TargetParams targetingParams)

Member Data Documentation

◆ DisableEnemyAI

bool Barotrauma.EnemyAIController.DisableEnemyAI
static

◆ TargetOutposts

bool Barotrauma.EnemyAIController.TargetOutposts

Enable the character to attack the outposts and the characters inside them. Disabled by default in normal levels, enabled in outpost levels.

Property Documentation

◆ ActiveAttack

Attack Barotrauma.EnemyAIController.ActiveAttack
get

◆ AIParams

CharacterParams.AIParams Barotrauma.EnemyAIController.AIParams
get

Shorthand for Character.Params.AI with null checking.

Returns
Character.Params.AI or an empty params. Does not return nulls.

◆ AttackHumans

bool Barotrauma.EnemyAIController.AttackHumans
get

◆ AttackLimb

Limb Barotrauma.EnemyAIController.AttackLimb
get

◆ AttackRooms

bool Barotrauma.EnemyAIController.AttackRooms
get

◆ CanAttackDoors

bool Barotrauma.EnemyAIController.CanAttackDoors
get

◆ CanEnterSubmarine

override CanEnterSubmarine Barotrauma.EnemyAIController.CanEnterSubmarine
get

◆ CanFlip

override bool Barotrauma.EnemyAIController.CanFlip
get

◆ CombatStrength

float Barotrauma.EnemyAIController.CombatStrength
get

◆ LatchOntoAI

LatchOntoAI Barotrauma.EnemyAIController.LatchOntoAI
get

◆ PetBehavior

PetBehavior Barotrauma.EnemyAIController.PetBehavior
get

◆ PreviousState

AIState Barotrauma.EnemyAIController.PreviousState
get

◆ PriorityFearIncrement

float Barotrauma.EnemyAIController.PriorityFearIncrement
get

◆ Reverse

bool Barotrauma.EnemyAIController.Reverse
get

◆ SelectedTargetingParams

CharacterParams.TargetParams Barotrauma.EnemyAIController.SelectedTargetingParams
get

◆ SelectedTargetMemory

AITargetMemory Barotrauma.EnemyAIController.SelectedTargetMemory
get

◆ State

AIState Barotrauma.EnemyAIController.State
getset

◆ SwarmBehavior

SwarmBehavior Barotrauma.EnemyAIController.SwarmBehavior
get

◆ UnattackableSubmarines

HashSet<Submarine> Barotrauma.EnemyAIController.UnattackableSubmarines = new HashSet<Submarine>()
get

The monster won't try to damage these submarines.


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