Class SunTerrainLayerGroup
Inheritance
Inherited Members
Namespace: Fwt.HexTerrains.Suns.Data
Assembly: fwt.hexterrains.dll
Syntax
public class SunTerrainLayerGroup : HexTerrainLayerGroup<SunTerrainLayer>, IDisposable, ISerializableTerrainLayer, IComponentData, IQueryTypeParameter
Fields
LastSimulationFrame
Declaration
protected long LastSimulationFrame
Field Value
| Type | Description |
|---|---|
| long |
Methods
CreateTerrainLayer<TInitArgs>(TInitArgs)
This function is called to create a new terrain layer of type TTerrainLayer. Default implementation uses an Activator to create a new instance of TTerrainLayer, expecting that the TTerrainLayer has a parameterless constructor. Override this function in your derived class to have a custom way of creating a terrain layer.
Declaration
public override SunTerrainLayer CreateTerrainLayer<TInitArgs>(TInitArgs initArgs)
Parameters
| Type | Name | Description |
|---|---|---|
| TInitArgs | initArgs | Initialization arguments for creating a layer |
Returns
| Type | Description |
|---|---|
| SunTerrainLayer | Returns a created instance of the terrain layer of type (inherited from) TTerrainLayer |
Type Parameters
| Name | Description |
|---|---|
| TInitArgs | Init terrain layer arguments object that is used in create layer process. Default implementation ignores this parameter, but in your overrided implementation it may be needed |
Overrides
InitTerrainLayer<TInitArgs>(SunTerrainLayer, HexTerrainSettings, TInitArgs)
Initializes the terrain layer with the specified settings and initialization arguments.
Declaration
public override void InitTerrainLayer<TInitArgs>(SunTerrainLayer layer, HexTerrainSettings settings, TInitArgs initArgs)
Parameters
| Type | Name | Description |
|---|---|---|
| SunTerrainLayer | layer | nested terrain layer to be initialized with provided init args |
| HexTerrainSettings | settings | HexTerrainSettings of the terrain this layers list is attached to |
| TInitArgs | initArgs | Initialization arguments for provided nested terrain layer |
Type Parameters
| Name | Description |
|---|---|
| TInitArgs | Initialization arguments for a nested terrain layer |
Overrides
Simulate(GeoPlastLayerGroup, HexTerrainSimulationTimer, JobHandle)
Simulates all the layers in order they are in the list.
Declaration
public virtual JobHandle Simulate(GeoPlastLayerGroup geoPlastLayers, HexTerrainSimulationTimer simulationTime, JobHandle dependency)
Parameters
| Type | Name | Description |
|---|---|---|
| GeoPlastLayerGroup | geoPlastLayers | |
| HexTerrainSimulationTimer | simulationTime | Simulation time structure. Use this values in your calculations to be in sync with all other simulations |
| JobHandle | dependency | dependency for jobs to schedule |
Returns
| Type | Description |
|---|---|
| JobHandle | job handle of all the scheduled jobs |