Barotrauma Client Doc
Barotrauma.SubmarineBody Class Reference

Public Member Functions

 SubmarineBody (Submarine sub, bool showErrorMessages=true)
 
void Update (float deltaTime)
 
void ApplyForce (Vector2 force)
 
void SetPosition (Vector2 position)
 
void FlipX ()
 
bool OnCollision (Fixture f1, Fixture f2, Contact contact)
 
void Remove ()
 

Public Attributes

readonly PhysicsBody Body
 

Static Public Attributes

const float NeutralBallastPercentage = 0.07f
 
const Category CollidesWith
 

Properties

List< Vector2 > HullVertices [get]
 
Rectangle Borders [get]
 Extents of the solid items/structures (ones with a physics body) and hulls More...
 
Rectangle VisibleBorders [get]
 Extents of all the visible items/structures/hulls (including ones without a physics body) More...
 
Vector2 Velocity [get, set]
 
Vector2 Position [get]
 
List< PosInfoPositionBuffer [get]
 
Submarine Submarine [get]
 

Detailed Description

Constructor & Destructor Documentation

◆ SubmarineBody()

Barotrauma.SubmarineBody.SubmarineBody ( Submarine  sub,
bool  showErrorMessages = true 
)

Member Function Documentation

◆ ApplyForce()

void Barotrauma.SubmarineBody.ApplyForce ( Vector2  force)

◆ FlipX()

void Barotrauma.SubmarineBody.FlipX ( )

◆ OnCollision()

bool Barotrauma.SubmarineBody.OnCollision ( Fixture  f1,
Fixture  f2,
Contact  contact 
)

◆ Remove()

void Barotrauma.SubmarineBody.Remove ( )

◆ SetPosition()

void Barotrauma.SubmarineBody.SetPosition ( Vector2  position)

◆ Update()

void Barotrauma.SubmarineBody.Update ( float  deltaTime)

Member Data Documentation

◆ Body

readonly PhysicsBody Barotrauma.SubmarineBody.Body

◆ CollidesWith

const Category Barotrauma.SubmarineBody.CollidesWith
static
Initial value:
=
Physics.CollisionItem |
Physics.CollisionLevel |
Physics.CollisionCharacter |
Physics.CollisionProjectile |
Physics.CollisionWall

Definition at line 21 of file BarotraumaShared/SharedSource/Map/SubmarineBody.cs.

◆ NeutralBallastPercentage

const float Barotrauma.SubmarineBody.NeutralBallastPercentage = 0.07f
static

Property Documentation

◆ Borders

Rectangle Barotrauma.SubmarineBody.Borders
get

Extents of the solid items/structures (ones with a physics body) and hulls

Definition at line 85 of file BarotraumaShared/SharedSource/Map/SubmarineBody.cs.

◆ HullVertices

List<Vector2> Barotrauma.SubmarineBody.HullVertices
get

◆ Position

Vector2 Barotrauma.SubmarineBody.Position
get

◆ PositionBuffer

List<PosInfo> Barotrauma.SubmarineBody.PositionBuffer
get

◆ Submarine

Submarine Barotrauma.SubmarineBody.Submarine
get

◆ Velocity

Vector2 Barotrauma.SubmarineBody.Velocity
getset

◆ VisibleBorders

Rectangle Barotrauma.SubmarineBody.VisibleBorders
get

Extents of all the visible items/structures/hulls (including ones without a physics body)

Definition at line 94 of file BarotraumaShared/SharedSource/Map/SubmarineBody.cs.