|
bool | HasValidPath (bool requireNonDirty=true, bool requireUnfinished=true, Func< WayPoint, bool > nodePredicate=null) |
| Is the current path valid, using the provided parameters. More...
|
|
| AIController (Character c) |
|
virtual void | OnHealed (Character healer, float healAmount) |
|
virtual void | OnAttacked (Character attacker, AttackResult attackResult) |
|
virtual void | SelectTarget (AITarget target) |
|
virtual void | Update (float deltaTime) |
|
virtual void | Reset () |
|
void | FaceTarget (ISpatialEntity target) |
|
virtual bool | SteerThroughGap (Structure wall, WallSection section, Vector2 targetWorldPos, float deltaTime) |
|
virtual bool | SteerThroughGap (Gap gap, Vector2 targetWorldPos, float deltaTime, float maxDistance=-1) |
|
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 () |
|
abstract bool | Escape (float deltaTime) |
|
void | ResetEscape () |
|
Definition at line 11 of file AIController.cs.
◆ AIController()
Barotrauma.AIController.AIController |
( |
Character |
c | ) |
|
◆ CanPassThroughHole()
bool Barotrauma.AIController.CanPassThroughHole |
( |
Structure |
wall, |
|
|
int |
sectionIndex, |
|
|
int |
requiredHoleCount |
|
) |
| |
◆ Escape()
abstract bool Barotrauma.AIController.Escape |
( |
float |
deltaTime | ) |
|
|
pure virtual |
◆ FaceTarget()
◆ HasValidPath()
bool Barotrauma.AIController.HasValidPath |
( |
bool |
requireNonDirty = true , |
|
|
bool |
requireUnfinished = true , |
|
|
Func< WayPoint, bool > |
nodePredicate = null |
|
) |
| |
Is the current path valid, using the provided parameters.
- Parameters
-
requireNonDirty | |
requireUnfinished | |
nodePredicate | |
- Returns
- When nodePredicate is defined, returns false if any of the nodes fails to match the predicate.
Definition at line 119 of file AIController.cs.
◆ IsWallDisabled()
bool Barotrauma.AIController.IsWallDisabled |
( |
Structure |
wall | ) |
|
|
protected |
◆ OnAttacked()
◆ OnHealed()
virtual void Barotrauma.AIController.OnHealed |
( |
Character |
healer, |
|
|
float |
healAmount |
|
) |
| |
|
virtual |
◆ OnStateChanged()
virtual void Barotrauma.AIController.OnStateChanged |
( |
AIState |
from, |
|
|
AIState |
to |
|
) |
| |
|
protectedvirtual |
◆ OnTargetChanged()
virtual void Barotrauma.AIController.OnTargetChanged |
( |
AITarget |
previousTarget, |
|
|
AITarget |
newTarget |
|
) |
| |
|
protectedvirtual |
◆ ReequipUnequipped()
void Barotrauma.AIController.ReequipUnequipped |
( |
| ) |
|
◆ Reset()
virtual void Barotrauma.AIController.Reset |
( |
| ) |
|
|
virtual |
◆ ResetAITarget()
void Barotrauma.AIController.ResetAITarget |
( |
| ) |
|
|
protected |
◆ ResetEscape()
void Barotrauma.AIController.ResetEscape |
( |
| ) |
|
◆ SelectTarget()
virtual void Barotrauma.AIController.SelectTarget |
( |
AITarget |
target | ) |
|
|
virtual |
◆ SteerThroughGap() [1/2]
virtual bool Barotrauma.AIController.SteerThroughGap |
( |
Gap |
gap, |
|
|
Vector2 |
targetWorldPos, |
|
|
float |
deltaTime, |
|
|
float |
maxDistance = -1 |
|
) |
| |
|
virtual |
◆ SteerThroughGap() [2/2]
virtual bool Barotrauma.AIController.SteerThroughGap |
( |
Structure |
wall, |
|
|
WallSection |
section, |
|
|
Vector2 |
targetWorldPos, |
|
|
float |
deltaTime |
|
) |
| |
|
virtual |
◆ TakeItem()
bool Barotrauma.AIController.TakeItem |
( |
Item |
item, |
|
|
CharacterInventory |
targetInventory, |
|
|
bool |
equip, |
|
|
bool |
wear = false , |
|
|
bool |
dropOtherIfCannotMove = true , |
|
|
bool |
allowSwapping = false , |
|
|
bool |
storeUnequipped = false , |
|
|
IEnumerable< Identifier > |
targetTags = null |
|
) |
| |
◆ UnequipContainedItems() [1/2]
static void Barotrauma.AIController.UnequipContainedItems |
( |
Character |
character, |
|
|
Item |
parentItem, |
|
|
Func< Item, bool > |
predicate, |
|
|
bool |
avoidDroppingInSea = true , |
|
|
int? |
unequipMax = null |
|
) |
| |
|
static |
◆ UnequipContainedItems() [2/2]
void Barotrauma.AIController.UnequipContainedItems |
( |
Item |
parentItem, |
|
|
Func< Item, bool > |
predicate = null , |
|
|
bool |
avoidDroppingInSea = true , |
|
|
int? |
unequipMax = null |
|
) |
| |
◆ UnequipEmptyItems() [1/2]
static void Barotrauma.AIController.UnequipEmptyItems |
( |
Character |
character, |
|
|
Item |
parentItem, |
|
|
bool |
avoidDroppingInSea = true |
|
) |
| |
|
static |
◆ UnequipEmptyItems() [2/2]
void Barotrauma.AIController.UnequipEmptyItems |
( |
Item |
parentItem, |
|
|
bool |
avoidDroppingInSea = true |
|
) |
| |
◆ Update()
virtual void Barotrauma.AIController.Update |
( |
float |
deltaTime | ) |
|
|
virtual |
◆ UpdateEscape()
bool Barotrauma.AIController.UpdateEscape |
( |
float |
deltaTime, |
|
|
bool |
canAttackDoors |
|
) |
| |
|
protected |
◆ _lastAiTarget
AITarget Barotrauma.AIController._lastAiTarget |
|
protected |
◆ _previousAiTarget
AITarget Barotrauma.AIController._previousAiTarget |
|
protected |
◆ _selectedAiTarget
AITarget Barotrauma.AIController._selectedAiTarget |
|
protected |
◆ allGapsSearched
bool Barotrauma.AIController.allGapsSearched |
|
protected |
◆ avoidLookAheadDistance
readonly float Barotrauma.AIController.avoidLookAheadDistance |
|
protected |
◆ Character
readonly Character Barotrauma.AIController.Character |
◆ colliderLength
readonly float Barotrauma.AIController.colliderLength |
|
protected |
◆ colliderWidth
readonly float Barotrauma.AIController.colliderWidth |
|
protected |
◆ Enabled
bool Barotrauma.AIController.Enabled |
◆ minGapSize
readonly float Barotrauma.AIController.minGapSize |
|
protected |
◆ steeringManager
◆ unreachableGaps
readonly HashSet<Gap> Barotrauma.AIController.unreachableGaps = new HashSet<Gap>() |
|
protected |
◆ CanEnterSubmarine
virtual bool Barotrauma.AIController.CanEnterSubmarine |
|
get |
◆ CanFlip
virtual bool Barotrauma.AIController.CanFlip |
|
get |
◆ EscapeTarget
Gap Barotrauma.AIController.EscapeTarget |
|
get |
◆ IsCurrentPathFinished
bool Barotrauma.AIController.IsCurrentPathFinished |
|
get |
◆ IsCurrentPathNullOrUnreachable
bool Barotrauma.AIController.IsCurrentPathNullOrUnreachable |
|
get |
◆ IsCurrentPathUnreachable
bool Barotrauma.AIController.IsCurrentPathUnreachable |
|
get |
◆ IsMentallyUnstable
virtual bool Barotrauma.AIController.IsMentallyUnstable |
|
get |
◆ IsSteeringThroughGap
bool Barotrauma.AIController.IsSteeringThroughGap |
|
getprotected set |
◆ IsTryingToSteerThroughGap
bool Barotrauma.AIController.IsTryingToSteerThroughGap |
|
getprotected set |
◆ SelectedAiTarget
AITarget Barotrauma.AIController.SelectedAiTarget |
|
getprotected set |
◆ SimPosition
Vector2 Barotrauma.AIController.SimPosition |
|
get |
◆ Steering
Vector2 Barotrauma.AIController.Steering |
|
getset |
◆ SteeringManager
◆ Velocity
Vector2 Barotrauma.AIController.Velocity |
|
get |
◆ VisibleHulls
IEnumerable<Hull> Barotrauma.AIController.VisibleHulls |
|
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.
Definition at line 99 of file AIController.cs.
◆ WorldPosition
Vector2 Barotrauma.AIController.WorldPosition |
|
get |