A class in Root.Township, Alta.Chunks.
A location chunk's links to other chunks: forced adjacent chunks (set in the inspector or at runtime, for example cave layers) and culling portals. Found on LocationChunk.Connections.
Constructors
| Member | What it is |
|---|
ChunkConnections() | Creates a ChunkConnections with default values. |
Fields
2 private and internal fields
| Member | What it is |
|---|
private List<ChunkAdjacencyConfiguration> forcedAdjacent | Backing field for ForcedAdjacent. |
private static Logger logger | NLog logger; logs each two-way connection made. |
Properties
| Member | What it is |
|---|
LocationChunk Chunk { get; private set; } | The location chunk these connections belong to, set by Initialize. |
List<ChunkAdjacencyConfiguration> ForcedAdjacent { get; } | Chunks treated as adjacent to this one regardless of position. |
List<CullingPortal> Portals { get; } | Culling portals leading out of this chunk. |
Methods
| Member | What it is |
|---|
static void ConnectTwoWay(LocationChunk a, LocationChunk b, float connectionCost = 1) | Links two location chunks to each other with the given cost. Used by CaveLayerManager to join caves to their entrances. |
void Initialize(LocationChunk chunk) | Sets the owning chunk. |
2 private and internal methods
| Member | What it is |
|---|
private void AddAdjacent(LocationChunk chunk, float connectionCost = 1) | Adds a forced link to a chunk and removes it again when that chunk's entity is destroyed by the scene. |
private void RemoveAdjacent(NetworkEntity entity, bool isUnload) | Drops the forced link to a chunk whose entity was destroyed. Hooked to DestroyedByScene by AddAdjacent. |
Used in
Members of other types that take, return or hold a ChunkConnections: