Barotrauma Client Doc
Barotrauma.SteeringManager Class Reference
Inheritance diagram for Barotrauma.SteeringManager:
Barotrauma.IndoorsSteeringManager

Public Member Functions

 SteeringManager (ISteerable host)
 
void SteeringSeek (Vector2 targetSimPos, float weight=1)
 
void SteeringWander (float weight=1, bool avoidWanderingOutsideLevel=false)
 
void SteeringAvoid (float deltaTime, float lookAheadDistance, float weight=1)
 
void SteeringManual (float deltaTime, Vector2 velocity)
 
void Reset ()
 
void ResetX ()
 
void ResetY ()
 
virtual void Update (float speed)
 

Protected Member Functions

virtual Vector2 DoSteeringSeek (Vector2 target, float weight)
 
virtual Vector2 DoSteeringWander (float weight, bool avoidWanderingOutsideLevel)
 
virtual Vector2 DoSteeringAvoid (float deltaTime, float lookAheadDistance, float weight, Vector2? heading=null)
 

Protected Attributes

ISteerable host
 
Vector2 steering
 

Static Protected Attributes

const float CircleDistance = 2.5f
 
const float CircleRadius = 0.3f
 
const float RayCastInterval = 0.5f
 

Properties

Vector2 AvoidDir [get]
 
Vector2 AvoidRayCastHitPosition [get]
 
Vector2 AvoidLookAheadPos [get]
 
float WanderAngle [get, set]
 

Detailed Description

Definition at line 7 of file SteeringManager.cs.

Constructor & Destructor Documentation

◆ SteeringManager()

Barotrauma.SteeringManager.SteeringManager ( ISteerable  host)

Definition at line 34 of file SteeringManager.cs.

Member Function Documentation

◆ DoSteeringAvoid()

virtual Vector2 Barotrauma.SteeringManager.DoSteeringAvoid ( float  deltaTime,
float  lookAheadDistance,
float  weight,
Vector2?  heading = null 
)
protectedvirtual

Definition at line 162 of file SteeringManager.cs.

◆ DoSteeringSeek()

virtual Vector2 Barotrauma.SteeringManager.DoSteeringSeek ( Vector2  target,
float  weight 
)
protectedvirtual

Reimplemented in Barotrauma.IndoorsSteeringManager.

Definition at line 98 of file SteeringManager.cs.

◆ DoSteeringWander()

virtual Vector2 Barotrauma.SteeringManager.DoSteeringWander ( float  weight,
bool  avoidWanderingOutsideLevel 
)
protectedvirtual

Definition at line 122 of file SteeringManager.cs.

◆ Reset()

void Barotrauma.SteeringManager.Reset ( )

Definition at line 64 of file SteeringManager.cs.

◆ ResetX()

void Barotrauma.SteeringManager.ResetX ( )

Definition at line 69 of file SteeringManager.cs.

◆ ResetY()

void Barotrauma.SteeringManager.ResetY ( )

Definition at line 74 of file SteeringManager.cs.

◆ SteeringAvoid()

void Barotrauma.SteeringManager.SteeringAvoid ( float  deltaTime,
float  lookAheadDistance,
float  weight = 1 
)

Definition at line 51 of file SteeringManager.cs.

◆ SteeringManual()

void Barotrauma.SteeringManager.SteeringManual ( float  deltaTime,
Vector2  velocity 
)

Definition at line 56 of file SteeringManager.cs.

◆ SteeringSeek()

void Barotrauma.SteeringManager.SteeringSeek ( Vector2  targetSimPos,
float  weight = 1 
)

Definition at line 41 of file SteeringManager.cs.

◆ SteeringWander()

void Barotrauma.SteeringManager.SteeringWander ( float  weight = 1,
bool  avoidWanderingOutsideLevel = false 
)

Definition at line 46 of file SteeringManager.cs.

◆ Update()

virtual void Barotrauma.SteeringManager.Update ( float  speed)
virtual

Reimplemented in Barotrauma.IndoorsSteeringManager.

Definition at line 79 of file SteeringManager.cs.

Member Data Documentation

◆ CircleDistance

const float Barotrauma.SteeringManager.CircleDistance = 2.5f
staticprotected

Definition at line 9 of file SteeringManager.cs.

◆ CircleRadius

const float Barotrauma.SteeringManager.CircleRadius = 0.3f
staticprotected

Definition at line 10 of file SteeringManager.cs.

◆ host

ISteerable Barotrauma.SteeringManager.host
protected

Definition at line 14 of file SteeringManager.cs.

◆ RayCastInterval

const float Barotrauma.SteeringManager.RayCastInterval = 0.5f
staticprotected

Definition at line 12 of file SteeringManager.cs.

◆ steering

Vector2 Barotrauma.SteeringManager.steering
protected

Definition at line 16 of file SteeringManager.cs.

Property Documentation

◆ AvoidDir

Vector2 Barotrauma.SteeringManager.AvoidDir
get

Definition at line 22 of file SteeringManager.cs.

◆ AvoidLookAheadPos

Vector2 Barotrauma.SteeringManager.AvoidLookAheadPos
get

Definition at line 24 of file SteeringManager.cs.

◆ AvoidRayCastHitPosition

Vector2 Barotrauma.SteeringManager.AvoidRayCastHitPosition
get

Definition at line 23 of file SteeringManager.cs.

◆ WanderAngle

float Barotrauma.SteeringManager.WanderAngle
getset

Definition at line 28 of file SteeringManager.cs.