Class StampCellMineralsUserToolState
Inheritance
Implements
Inherited Members
Namespace: Fwt.HexTerrains.UserTools.SM.States.Minerals
Assembly: fwt.hexterrains.dll
Syntax
public class StampCellMineralsUserToolState : StampUserToolStateBase<CellMineralsLayerGroup, CellMineralsLayer, (uint, float)>, ISmState
Constructors
StampCellMineralsUserToolState(ISmState)
Declaration
public StampCellMineralsUserToolState(ISmState parent)
Parameters
| Type | Name | Description |
|---|---|---|
| ISmState | parent |
Properties
UserToolType
Type identifier for the user tool. Allows state machine to change states based on tool type instead of state index.
Declaration
public override int UserToolType { get; }
Property Value
| Type | Description |
|---|---|
| int |
Overrides
Methods
ReadOriginCellData(CellMineralsLayer, int, out (uint, float))
Attempts to read the original cell data for the specified terrain layer and cell index.
Declaration
public override bool ReadOriginCellData(CellMineralsLayer terrainLayer, int cellIndex, out (uint, float) cellData)
Parameters
| Type | Name | Description |
|---|---|---|
| CellMineralsLayer | terrainLayer | The terrain layer from which to retrieve cell data. Cannot be null. |
| int | cellIndex | The zero-based index of the cell within the terrain layer whose data is to be read. Must be within the valid range of cell indices for the specified layer. |
| (uint, float) | cellData | When this method returns, contains the cell data associated with the specified cell index if the operation succeeds; otherwise, contains the default value for the cell data type. |
Returns
| Type | Description |
|---|---|
| bool | true if the cell data was successfully read; otherwise, false. |
Overrides
SetCellDataToTarget(CellMineralsLayer, int, (uint, float))
Attempts to set the specified cell data on the target terrain layer at the given cell index.
Declaration
public override bool SetCellDataToTarget(CellMineralsLayer terrainLayer, int cellIndex, (uint, float) cellData)
Parameters
| Type | Name | Description |
|---|---|---|
| CellMineralsLayer | terrainLayer | The terrain layer on which to set the cell data. Cannot be null. |
| int | cellIndex | The zero-based index of the cell within the terrain layer to update. Must be within the valid range of cell indices for the layer. |
| (uint, float) | cellData | The cell data to assign to the specified cell. Cannot be null. |
Returns
| Type | Description |
|---|---|
| bool | true if the cell data was successfully set; otherwise, false. |
Overrides
Remarks
This method does not modify the terrain layer if the cell index is out of range or if the cell data is invalid. Implementations may impose additional constraints on valid cell data or indices.