Interface ITerrainLayerFactory
Defines a factory for creating terrain layer instances used in hex-based map systems.
Namespace: Fwt.HexTerrains.Data
Assembly: fwt.hexterrains.dll
Syntax
public interface ITerrainLayerFactory
Remarks
Implementations of this interface provide methods to create default or custom terrain layers. Use the generic method to instantiate a specific subclass of HexTerrainLayer when specialized behavior or data is required.
Methods
CreateTerrainLayer()
Creates a new instance of a terrain layer for hex-based maps.
Declaration
HexTerrainLayer CreateTerrainLayer()
Returns
| Type | Description |
|---|---|
| HexTerrainLayer | A HexTerrainLayer representing the newly created terrain layer. |
CreateTerrainLayer<TTerrainLayer>()
Creates a new terrain layer instance of the specified type, if possible.
Declaration
TTerrainLayer CreateTerrainLayer<TTerrainLayer>() where TTerrainLayer : HexTerrainLayer
Returns
| Type | Description |
|---|---|
| TTerrainLayer | An instance of |
Type Parameters
| Name | Description |
|---|---|
| TTerrainLayer |
Remarks
If the created terrain layer is not of the requested type, it is disposed and null is returned. This method may return null if no terrain layer can be created.