ICaveLayer
An interface in Root.Township, Alta.Chunks.
One layer of a procedural cave, managed by a CaveLayerManager and linked to the layers around it by portals.
- Listed in World, chunks and saving
- Inherits or implements
IPortalApplier - Derived types
CaveLayerStreamer,StaticCaveChunk
Properties
| Member | What it is |
|---|---|
LocationChunk Chunk { get; } | The location chunk of this layer. |
float Depth { get; } | How deep the layer is. |
NetworkEntity Entity { get; } | The layer's network entity. |
Vector2 Entrance { get; } | Where the layer's entrance is. |
int LayerIdentifier { get; } | The layer number. |
CaveLayerManager Manager { get; } | The cave layer manager. |
string name { get; set; } | The layer object's name. |
Transform PortalTransform { get; } | Transform of the portal into this layer. |
Events
| Member | What it is |
|---|---|
event Action<int, float, Vector2, Vector2> ExitReady | Raised when the layer's exit is placed, with this layer's number, the depth below it, and the exit position and direction. |
Methods
| Member | What it is |
|---|---|
string GetIdentifier(int layer) | Builds the identifier string for a layer number. |
void InitializeCaveLayer(CaveLayerManager manager, int layer) | Sets the layer's manager and layer number. |
void RegisterPortal(LocationChunk chunk, ICaveLayer other) | Links this layer's portal in a chunk to another layer. |
void SetEntrance(float depth, Vector2 entrance, Vector2 direction) | Sets the depth, entrance position and direction. |
Used in
Members of other types that take, return or hold a ICaveLayer:
CaveLayerManager.CreateLayer, CaveLayerManager.Layers, CaveLayerManager.RequestPortalRegistering, CaveLayerManager.SpawnWithoutGenerating, CaveLayerChunk.caveLayer, CaveLayerStreamer.neighborStreamer, CaveLayerStreamer.RegisterPortal, StaticCaveChunk.RegisterPortal, ProgressCommandModule.ConnectTeleporter, ProgressCommandModule.GenerateCavesTo, ProgressCommandModule.RepairTeleporter.