Hex Terrains Framework
Search Results for

    Show / Hide Table of Contents

    Class SetValueUserToolStateBase<TBrushTarget, TTerrainLayer, TDataLayer, TCellValue>

    Inheritance
    object
    SmState
    UserToolStateBase
    HexTerrainUserToolStateBase
    BrushUserToolState<TBrushTarget>
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource>
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen>
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen, TTerrainLayer>
    DataLayerBrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen, TTerrainLayer, TDataLayer, TCellValue>
    SetValueUserToolStateBase<TBrushTarget, TTerrainLayer, TDataLayer, TCellValue>
    LevelSurfaceHeightUserToolState
    SetValueWithSurfaceReferenceUserToolStateBase<TBrushTarget, TTerrainLayer, TDataLayer, TCellValue>
    Implements
    ISmState
    Inherited Members
    DataLayerBrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen, TTerrainLayer, TDataLayer, TCellValue>.GetDataLayer(TTerrainLayer)
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen, TTerrainLayer>.IsGetLayerByIndex
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen, TTerrainLayer>.TerrainLayerIndex
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen, TTerrainLayer>.IsGetLayerByName
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen, TTerrainLayer>.TerrainLayerName
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen, TTerrainLayer>.ViewModeByLayerIndex
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen, TTerrainLayer>.Init<TInitArgs>(TInitArgs)
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen, TTerrainLayer>.UpdateSettingsScreen()
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen, TTerrainLayer>.OnTerrainLayerChanged()
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen, TTerrainLayer>.UpdateDescriptionAndErrorMessageOnDataSource()
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen, TTerrainLayer>.TrySetViewMode()
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen, TTerrainLayer>.GetViewModeByLayerIndex(int)
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen, TTerrainLayer>.GetTerrainLayer()
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen, TTerrainLayer>.GetTerrainLayer(TBrushTarget)
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen, TTerrainLayer>.GetTerrainLayer(TBrushTarget, int, string)
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen, TTerrainLayer>.GetTerrainLayer(TBrushTarget, int)
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen, TTerrainLayer>.GetTerrainLayer(TBrushTarget, string)
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen>.SettingsScreen
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen>.PrepareToRun()
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen>.PrepareToStop()
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen>.GetSettingsScreen()
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen>.UpdateSettingsScreen()
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource>.DataSource
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource>.SettingsPlayerPrefsKeyName
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource>.PrepareToRun()
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource>.InitSettings()
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource>.InitDefaultSettings()
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource>.PrepareToStop()
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource>.LoadSettings()
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource>.SaveSettings()
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource>.SaveSettingsValue<TValue>(string, TValue)
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource>.LoadSettingsValue<TValue>(string, TValue)
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource>.TryLoadSettingsValue<TValue>(string, out TValue)
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource>.LoadSettingsValueOrDefault<TValue>(string, TValue)
    BrushUserToolState<TBrushTarget>.PrevChangeTimeStamp
    BrushUserToolState<TBrushTarget>.TimeTreshold
    BrushUserToolState<TBrushTarget>.CanChangeBrushSize
    BrushUserToolState<TBrushTarget>.AllowRightMouseButton
    BrushUserToolState<TBrushTarget>.CursorColor
    BrushUserToolState<TBrushTarget>.ChangeModeKey
    BrushUserToolState<TBrushTarget>.ChangeBrushSizeKey
    BrushUserToolState<TBrushTarget>.ChangeOpacityKey
    BrushUserToolState<TBrushTarget>.IncreaseBrushSizeKey
    BrushUserToolState<TBrushTarget>.IncreaseBrushSizeKey2
    BrushUserToolState<TBrushTarget>.DecreaseBrushSizeKey
    BrushUserToolState<TBrushTarget>.DecreaseBrushSizeKey2
    BrushUserToolState<TBrushTarget>.IsTimeTresholdPassed
    BrushUserToolState<TBrushTarget>.BrushSize
    BrushUserToolState<TBrushTarget>.BrushOpacity
    BrushUserToolState<TBrushTarget>.ChangeOpacityMultiplier
    BrushUserToolState<TBrushTarget>.SetNewTimestamp()
    BrushUserToolState<TBrushTarget>.PrepareToRun()
    BrushUserToolState<TBrushTarget>.PrepareToStop()
    BrushUserToolState<TBrushTarget>.Tick()
    BrushUserToolState<TBrushTarget>.UpdateBrush()
    BrushUserToolState<TBrushTarget>.TryApplyBrush()
    BrushUserToolState<TBrushTarget>.ApplyToSingleCell(int, int2, int, TBrushTarget, int)
    BrushUserToolState<TBrushTarget>.ApplyBrushToAllCells(int, HexTerrainSettings, TBrushTarget, int)
    BrushUserToolState<TBrushTarget>.ApplyBrushToAllBrushPoints(int, int2, int, HexTerrainSettings, TBrushTarget, int)
    BrushUserToolState<TBrushTarget>.CanBeAppliedToManyPoints(int)
    BrushUserToolState<TBrushTarget>.GetBrushTarget()
    HexTerrainUserToolStateBase.TerrainAPI
    HexTerrainUserToolStateBase.HexTerrainUserToolSettings
    HexTerrainUserToolStateBase.PreviousViewMode
    HexTerrainUserToolStateBase.Init(HexTerrainUserToolStateSettings)
    HexTerrainUserToolStateBase.Init(IHexTerrainAPI)
    HexTerrainUserToolStateBase.Init<TInitArgs>(IHexTerrainAPI, TInitArgs)
    HexTerrainUserToolStateBase.ShowSettingsScreen<TViewData, TScreen>(TViewData)
    HexTerrainUserToolStateBase.GetUIScreen<TScreen>()
    HexTerrainUserToolStateBase.HideSettingsScreen<TScreen>()
    HexTerrainUserToolStateBase.SetupTerrainCursor(bool, int)
    HexTerrainUserToolStateBase.SetupTerrainCursor(bool, int, Color32)
    HexTerrainUserToolStateBase.SetupTerrainCursor(bool, int, Color32, bool)
    HexTerrainUserToolStateBase.SetupTerrainCursor(bool)
    HexTerrainUserToolStateBase.GetTerrainLayer<TLayerGroup, TLayer>(HexTerrainLayerReference)
    HexTerrainUserToolStateBase.TrySetViewMode()
    HexTerrainUserToolStateBase.SetViewMode(SetViewModeRequest)
    HexTerrainUserToolStateBase.TryRestoreViewMode()
    UserToolStateBase.Settings
    UserToolStateBase.Parent
    UserToolStateBase.ParentStateMachine
    UserToolStateBase.UserToolType
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Fwt.HexTerrains.UserTools.SM.States
    Assembly: fwt.hexterrains.dll
    Syntax
    public abstract class SetValueUserToolStateBase<TBrushTarget, TTerrainLayer, TDataLayer, TCellValue> : DataLayerBrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen, 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

    SetValueUserToolStateBase(ISmState)

    Declaration
    protected SetValueUserToolStateBase(ISmState parent)
    Parameters
    Type Name Description
    ISmState parent

    Fields

    ReadValueKey

    When this key is pressed, click will read elevation under cursor instead of applying it

    Declaration
    public KeyCode ReadValueKey
    Field Value
    Type Description
    KeyCode

    _isClampCellValue

    Declaration
    protected bool _isClampCellValue
    Field Value
    Type Description
    bool

    _maxCellValue

    Declaration
    protected TCellValue _maxCellValue
    Field Value
    Type Description
    TCellValue

    _minCellValue

    Declaration
    protected TCellValue _minCellValue
    Field Value
    Type Description
    TCellValue

    Properties

    CellValue

    Value to be applied to the terrain data layer cells.

    Declaration
    public virtual TCellValue CellValue { get; set; }
    Property Value
    Type Description
    TCellValue

    DataSourceItemsCount

    Amount of DataSource entries this class contributes to the settings screen. The first entry is reserved for the terrain layer index, the second for the cell value.

    Declaration
    public int DataSourceItemsCount { get; }
    Property Value
    Type Description
    int

    IsClampCellValue

    If true, the cell value will be clamped between MinCellValue and MaxCellValue

    Declaration
    public virtual bool IsClampCellValue { get; set; }
    Property Value
    Type Description
    bool

    MaxCellValue

    Maximum cell value when clamping is enabled

    Declaration
    public virtual TCellValue MaxCellValue { get; set; }
    Property Value
    Type Description
    TCellValue

    MinCellValue

    Minimum cell value when clamping is enabled

    Declaration
    public virtual TCellValue MinCellValue { get; set; }
    Property Value
    Type Description
    TCellValue

    TerrainLayerIndex

    If IsGetLayerByIndex is true, this index is used to get terrain layer from terrain layers list."/>

    Declaration
    public override int TerrainLayerIndex { get; set; }
    Property Value
    Type Description
    int
    Overrides
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen, TTerrainLayer>.TerrainLayerIndex

    Methods

    ApplyBrush(int, int2, int, TBrushTarget, int)

    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
    Type Description
    bool
    Overrides
    BrushUserToolState<TBrushTarget>.ApplyBrush(int, int2, int, TBrushTarget, int)

    Init(UserToolStateSettings)

    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
    UserToolStateBase.Init(UserToolStateSettings)

    InitDefaultSettings()

    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
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource>.InitDefaultSettings()
    Remarks

    Override this method in a subclass to provide custom initialization logic for default settings. The base implementation does not perform any actions.

    Init<TInitArgs>(TInitArgs)

    Initializes the tool using the specified initialization arguments.

    Declaration
    public override void Init<TInitArgs>(TInitArgs args)
    Parameters
    Type Name Description
    TInitArgs args

    The initialization arguments used to configure the tool. If the argument implements IUserToolStateConfig, its ToolSettings are used; otherwise, default settings are applied.

    Type Parameters
    Name Description
    TInitArgs

    The type of the initialization arguments used to configure the tool. If the type implements IUserToolStateConfig, its ToolSettings will be used; otherwise, default settings are applied.

    Overrides
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource, UniversalToolSettingsScreen, TTerrainLayer>.Init<TInitArgs>(TInitArgs)

    IsAppliedToEveryCellOnMap(int)

    Determines whether the specified brush mode applies to every cell on the map.

    Declaration
    public override bool IsAppliedToEveryCellOnMap(int brushMode)
    Parameters
    Type Name Description
    int brushMode

    The brush mode to evaluate. Typically, a value of 1 indicates that the brush is applied to all cells.

    Returns
    Type Description
    bool

    true if the brush mode applies to every cell on the map; otherwise, false.

    Overrides
    BrushUserToolState<TBrushTarget>.IsAppliedToEveryCellOnMap(int)

    LoadSettings()

    Loads configuration settings for the current instance. Derived classes override this method to implement custom settings initialization.

    Declaration
    protected override void LoadSettings()
    Overrides
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource>.LoadSettings()
    Remarks

    Override this method in a subclass to provide specific logic for loading or initializing settings. This method is called during the setup or initialization phase and does not perform any actions in the base implementation.

    ReadCellValue(TDataLayer)

    Attempts to read the value of the terrain cell currently targeted by the raycast and updates the cell value if available.

    Declaration
    protected virtual void ReadCellValue(TDataLayer dataLayer)
    Parameters
    Type Name Description
    TDataLayer dataLayer

    The data layer from which to retrieve cell values. Cannot be null.

    Remarks

    If no cell is targeted by the raycast or the cell value cannot be retrieved, the method does not update the cell value or settings screen.

    SaveSettings()

    Saves the current settings to the underlying storage or configuration source.

    Declaration
    protected override void SaveSettings()
    Overrides
    BrushUserToolState<TBrushTarget, UserToolSettingsDataSource>.SaveSettings()
    Remarks

    Override this method in a derived class to implement custom logic for persisting settings. This method does not perform any action in the base implementation.

    Implements

    ISmState

    Extension Methods

    HashExtensions.GetHashCode_RefType<TValue>(TValue, int)
    Extensions_UnityObject.SmartDestroy(object)
    Extensions_UnityObject.SmartGetComponent<TComponent>(object)
    Extensions_UnityObject.SmartGetGameGameObject(object)
    In this article
    Back to top Generated by DocFX