Class SetValueWithSurfaceReferenceUserToolStateBase<TBrushTarget, TTerrainLayer, TDataLayer, TCellValue>
Inheritance
SetValueWithSurfaceReferenceUserToolStateBase<TBrushTarget, TTerrainLayer, TDataLayer, TCellValue>
Assembly: fwt.hexterrains.dll
public abstract class SetValueWithSurfaceReferenceUserToolStateBase<TBrushTarget, TTerrainLayer, TDataLayer, TCellValue> : SetValueUserToolStateBase<TBrushTarget, TTerrainLayer, TDataLayer, TCellValue>, ISmState where TBrushTarget : HexTerrainLayerGroup where TTerrainLayer : HexTerrainLayer where TDataLayer : CellValueDataLayer<TCellValue> where TCellValue : unmanaged
Type Parameters
| Name |
Description |
| TBrushTarget |
|
| TTerrainLayer |
|
| TDataLayer |
|
| TCellValue |
|
Constructors
Declaration
protected SetValueWithSurfaceReferenceUserToolStateBase(ISmState parent)
Parameters
Properties
Amount of DataSource entries this class contributes to the settings screen.
Declaration
public int DataSourceItemsCount { get; }
Property Value
Declaration
public bool IsRestrictCellHeight { get; set; }
Property Value
Declaration
public float MaxSurfaceHeight { get; set; }
Property Value
Declaration
public float MinSurfaceHeight { get; set; }
Property Value
Declaration
public int SurfaceLayerIndex { get; set; }
Property Value
Methods
Applies brush to the brushView. Returns true if changes were applied
Declaration
public override bool ApplyBrush(int brushMode, int2 cellCoord, int cellIndex, TBrushTarget brushTarget, int mouseButton)
Parameters
| Type |
Name |
Description |
| int |
brushMode |
|
| int2 |
cellCoord |
|
| int |
cellIndex |
|
| TBrushTarget |
brushTarget |
|
| int |
mouseButton |
|
Returns
Overrides
Initializes the tool state with the specified settings.
Declaration
public override void Init(UserToolStateSettings settings)
Parameters
| Type |
Name |
Description |
| UserToolStateSettings |
settings |
The settings to apply to the tool state. Cannot be null.
|
Overrides
Initializes the default settings for the current instance. This method is intended to be overridden in
derived classes to configure initial values or options as needed.
Declaration
protected override void InitDefaultSettings()
Overrides
Declaration
protected bool IsCellWithinSurfaceRestrictions(int cellIndex)
Parameters
| Type |
Name |
Description |
| int |
cellIndex |
|
Returns
Loads configuration settings for the current instance. Derived classes override this method to implement
custom settings initialization.
Declaration
protected override void LoadSettings()
Overrides
Saves the current settings to the underlying storage or configuration source.
Declaration
protected override void SaveSettings()
Overrides
Implements
Extension Methods