Class HexCellEntityViewDataLayer
Inheritance
HexCellEntityViewDataLayer
Assembly: fwt.hexterrains.dll
Syntax
public class HexCellEntityViewDataLayer : HexTerrainNativeListChunkedDataLayer<HexCellEntityView>, IDisposable, ICommitChanges, IListDataLayer<HexCellEntityView>
Fields
ClearedCells
Cell indexes of the cells that got empty (contained some resource and now they don't)
Needed to keep track of all resource entities that are no longer needed11111
Declaration
public NativeParallelHashSet<int> ClearedCells
Field Value
| Type |
Description |
| NativeParallelHashSet<int> |
|
CreateEntityRequests
Key - entity prefab, Value - cellIndex
Declaration
public NativeParallelMultiHashMap<Entity, int> CreateEntityRequests
Field Value
| Type |
Description |
| NativeParallelMultiHashMap<Entity, int> |
|
EntityByChunkIndex
Declaration
public NativeParallelMultiHashMap<int, Entity> EntityByChunkIndex
Field Value
| Type |
Description |
| NativeParallelMultiHashMap<int, Entity> |
|
RemoveEntityRequests
Key - entity instance to destroy, Value = cellIndex
Declaration
public NativeParallelMultiHashMap<Entity, int> RemoveEntityRequests
Field Value
| Type |
Description |
| NativeParallelMultiHashMap<Entity, int> |
|
Properties
EntityManager
Declaration
public EntityManager EntityManager { get; set; }
Property Value
| Type |
Description |
| EntityManager |
|
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()
Declaration
public override JobHandle CleanupAsync()
Returns
| Type |
Description |
| JobHandle |
|
Overrides
ClearRemoveAndCreateRequests()
Declaration
public virtual void ClearRemoveAndCreateRequests()
DestroyAllEntities(EntityManager)
Declaration
public virtual void DestroyAllEntities(EntityManager entityManager)
Parameters
| Type |
Name |
Description |
| EntityManager |
entityManager |
|
Dispose()
Declaration
public override void Dispose()
Overrides
DisposeDataItem(HexCellEntityView)
Disposes the item in the layer if it is IDisposable.
Declaration
protected override void DisposeDataItem(HexCellEntityView item)
Parameters
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
Implements
Extension Methods