Barotrauma Client Doc
Barotrauma.EntityGrid Class Reference

Public Member Functions

 EntityGrid (Submarine submarine, float cellSize)
 
 EntityGrid (Rectangle worldRect, float cellSize)
 
void InsertEntity (MapEntity entity)
 
void RemoveEntity (MapEntity entity)
 
void Clear ()
 
IEnumerable< MapEntityGetAllEntities ()
 
List< MapEntityGetEntities (Vector2 position)
 
Rectangle GetIndices (Rectangle rect)
 
Point GetIndices (Vector2 position)
 

Public Attributes

readonly Submarine Submarine
 

Properties

Rectangle WorldRect [get]
 

Detailed Description

Definition at line 7 of file EntityGrid.cs.

Constructor & Destructor Documentation

◆ EntityGrid() [1/2]

Barotrauma.EntityGrid.EntityGrid ( Submarine  submarine,
float  cellSize 
)

Definition at line 36 of file EntityGrid.cs.

◆ EntityGrid() [2/2]

Barotrauma.EntityGrid.EntityGrid ( Rectangle  worldRect,
float  cellSize 
)

Definition at line 52 of file EntityGrid.cs.

Member Function Documentation

◆ Clear()

void Barotrauma.EntityGrid.Clear ( )

Definition at line 107 of file EntityGrid.cs.

◆ GetAllEntities()

IEnumerable<MapEntity> Barotrauma.EntityGrid.GetAllEntities ( )

Definition at line 119 of file EntityGrid.cs.

◆ GetEntities()

List<MapEntity> Barotrauma.EntityGrid.GetEntities ( Vector2  position)

Definition at line 124 of file EntityGrid.cs.

◆ GetIndices() [1/2]

Rectangle Barotrauma.EntityGrid.GetIndices ( Rectangle  rect)

Definition at line 137 of file EntityGrid.cs.

◆ GetIndices() [2/2]

Point Barotrauma.EntityGrid.GetIndices ( Vector2  position)

Definition at line 149 of file EntityGrid.cs.

◆ InsertEntity()

void Barotrauma.EntityGrid.InsertEntity ( MapEntity  entity)

Definition at line 72 of file EntityGrid.cs.

◆ RemoveEntity()

void Barotrauma.EntityGrid.RemoveEntity ( MapEntity  entity)

Definition at line 95 of file EntityGrid.cs.

Member Data Documentation

◆ Submarine

readonly Submarine Barotrauma.EntityGrid.Submarine

Definition at line 16 of file EntityGrid.cs.

Property Documentation

◆ WorldRect

Rectangle Barotrauma.EntityGrid.WorldRect
get

Definition at line 18 of file EntityGrid.cs.