Class ColorMapCellValueDataLayer<TCellValue>
Data layer for storing a TCellValue value per cell,
and a color per cell, so the color map can be calculated
Inheritance
ColorMapCellValueDataLayer<TCellValue>
Assembly: fwt.hexterrains.dll
Syntax
public class ColorMapCellValueDataLayer<TCellValue> : CellValueDataLayer<TCellValue>, IDisposable, ICommitChanges, IListDataLayer<TCellValue> where TCellValue : unmanaged
Type Parameters
| Name |
Description |
| TCellValue |
Type of value per cell
|
Fields
IsColorMapEnabled
If false, color map calculations will be skipped, and the color map data layer will not be used.
Declaration
public bool IsColorMapEnabled
Field Value
Properties
ColorMap
Declaration
public virtual ColorMapDataLayer ColorMap { get; set; }
Property Value
DefaultColor
This color is usually used to paint cells that have default TCellValue value.
Declaration
public virtual Color32 DefaultColor { get; set; }
Property Value
IsDisposableItems
If true, means when layer is resized or disposed, all items that are removed will be disposed
(see nested classes description for details as the process may be different from layer to layer)
Declaration
public override bool IsDisposableItems { get; }
Property Value
Overrides
Methods
Cleanup()
Declaration
public override void Cleanup()
Overrides
CleanupAsync(JobHandle)
Declaration
public override JobHandle CleanupAsync(JobHandle dependency)
Parameters
| Type |
Name |
Description |
| JobHandle |
dependency |
|
Returns
| Type |
Description |
| JobHandle |
|
Overrides
Dispose()
Declaration
public override void Dispose()
Overrides
Init(int)
Initializes/Reinitializes the data layer with the specified size.
Declaration
public override void Init(int layerSize)
Parameters
| Type |
Name |
Description |
| int |
layerSize |
amount of cells in the data layer
|
Overrides
Init(int, HexTerrainSettings)
Declaration
public override void Init(int layerSize, HexTerrainSettings settings)
Parameters
Overrides
Init(int, HexTerrainSettings, NativeArray<Color32>)
Declaration
public virtual void Init(int layerSize, HexTerrainSettings terrainSettings, NativeArray<Color32> copyColorPaletteFrom)
Parameters
| Type |
Name |
Description |
| int |
layerSize |
|
| HexTerrainSettings |
terrainSettings |
|
| NativeArray<Color32> |
copyColorPaletteFrom |
|
InitColorPalette(IList<Color32>)
Declaration
public virtual void InitColorPalette(IList<Color32> copyColorPaletteFrom)
Parameters
| Type |
Name |
Description |
| IList<Color32> |
copyColorPaletteFrom |
|
InitColorPalette(NativeArray<Color32>)
Declaration
public virtual void InitColorPalette(NativeArray<Color32> copyColorPaletteFrom)
Parameters
| Type |
Name |
Description |
| NativeArray<Color32> |
copyColorPaletteFrom |
|
SetAllChunksDirty(bool)
Sets dirty flag for all chunks in the layer.
If isDirty is true, all chunks are marked dirty and added to the DirtyChunks hash set.
If isDirty is false, marks all chunks not dirty and clears the DirtyChunks hash set.
Declaration
public override void SetAllChunksDirty(bool isDirty)
Parameters
| Type |
Name |
Description |
| bool |
isDirty |
IsDirty value to set for all chunks
|
Overrides
SetAllChunksDirtyAsync(bool, JobHandle)
Sets dirty flag for all chunks in the layer in a corresponding job.
Returns a job handle that can be used to wait for the job to complete.
Declaration
public override JobHandle SetAllChunksDirtyAsync(bool isDirty, JobHandle dependency)
Parameters
| Type |
Name |
Description |
| bool |
isDirty |
dirty value to set for all chunks
|
| JobHandle |
dependency |
job handle to put as dependency to FillDirtyChunksJob
|
Returns
| Type |
Description |
| JobHandle |
|
Overrides
Implements
Extension Methods