Hex Terrains Framework
Search Results for

    Show / Hide Table of Contents

    Class PaintCellMineralsUserToolState

    Inheritance
    object
    SmState
    UserToolStateBase
    HexTerrainUserToolStateBase
    BrushUserToolState<CellMineralsLayerGroup>
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource>
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen>
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen, CellMineralsLayer>
    PaintCellMineralsUserToolState
    Implements
    ISmState
    Inherited Members
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen, CellMineralsLayer>.IsGetLayerByIndex
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen, CellMineralsLayer>.TerrainLayerIndex
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen, CellMineralsLayer>.IsGetLayerByName
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen, CellMineralsLayer>.TerrainLayerName
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen, CellMineralsLayer>.ViewModeByLayerIndex
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen, CellMineralsLayer>.Init<TInitArgs>(TInitArgs)
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen, CellMineralsLayer>.UpdateSettingsScreen()
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen, CellMineralsLayer>.OnTerrainLayerChanged()
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen, CellMineralsLayer>.UpdateDescriptionAndErrorMessageOnDataSource()
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen, CellMineralsLayer>.TrySetViewMode()
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen, CellMineralsLayer>.GetViewModeByLayerIndex(int)
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen, CellMineralsLayer>.GetTerrainLayer()
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen, CellMineralsLayer>.GetTerrainLayer(CellMineralsLayerGroup)
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen, CellMineralsLayer>.GetTerrainLayer(CellMineralsLayerGroup, int, string)
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen, CellMineralsLayer>.GetTerrainLayer(CellMineralsLayerGroup, int)
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen, CellMineralsLayer>.GetTerrainLayer(CellMineralsLayerGroup, string)
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen>.SettingsScreen
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen>.PrepareToRun()
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen>.PrepareToStop()
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen>.GetSettingsScreen()
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen>.UpdateSettingsScreen()
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource>.DataSource
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource>.SettingsPlayerPrefsKeyName
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource>.PrepareToRun()
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource>.InitSettings()
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource>.InitDefaultSettings()
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource>.PrepareToStop()
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource>.LoadSettings()
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource>.SaveSettings()
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource>.SaveSettingsValue<TValue>(string, TValue)
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource>.LoadSettingsValue<TValue>(string, TValue)
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource>.TryLoadSettingsValue<TValue>(string, out TValue)
    BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource>.LoadSettingsValueOrDefault<TValue>(string, TValue)
    BrushUserToolState<CellMineralsLayerGroup>.PrevChangeTimeStamp
    BrushUserToolState<CellMineralsLayerGroup>.TimeTreshold
    BrushUserToolState<CellMineralsLayerGroup>.CanChangeBrushSize
    BrushUserToolState<CellMineralsLayerGroup>.AllowRightMouseButton
    BrushUserToolState<CellMineralsLayerGroup>.CursorColor
    BrushUserToolState<CellMineralsLayerGroup>.ChangeModeKey
    BrushUserToolState<CellMineralsLayerGroup>.ChangeBrushSizeKey
    BrushUserToolState<CellMineralsLayerGroup>.ChangeOpacityKey
    BrushUserToolState<CellMineralsLayerGroup>.IncreaseBrushSizeKey
    BrushUserToolState<CellMineralsLayerGroup>.IncreaseBrushSizeKey2
    BrushUserToolState<CellMineralsLayerGroup>.DecreaseBrushSizeKey
    BrushUserToolState<CellMineralsLayerGroup>.DecreaseBrushSizeKey2
    BrushUserToolState<CellMineralsLayerGroup>.IsTimeTresholdPassed
    BrushUserToolState<CellMineralsLayerGroup>.BrushSize
    BrushUserToolState<CellMineralsLayerGroup>.BrushOpacity
    BrushUserToolState<CellMineralsLayerGroup>.ChangeOpacityMultiplier
    BrushUserToolState<CellMineralsLayerGroup>.SetNewTimestamp()
    BrushUserToolState<CellMineralsLayerGroup>.PrepareToRun()
    BrushUserToolState<CellMineralsLayerGroup>.PrepareToStop()
    BrushUserToolState<CellMineralsLayerGroup>.Tick()
    BrushUserToolState<CellMineralsLayerGroup>.UpdateBrush()
    BrushUserToolState<CellMineralsLayerGroup>.TryApplyBrush()
    BrushUserToolState<CellMineralsLayerGroup>.ApplyToSingleCell(int, int2, int, CellMineralsLayerGroup, int)
    BrushUserToolState<CellMineralsLayerGroup>.ApplyBrushToAllCells(int, HexTerrainSettings, CellMineralsLayerGroup, int)
    BrushUserToolState<CellMineralsLayerGroup>.ApplyBrushToAllBrushPoints(int, int2, int, HexTerrainSettings, CellMineralsLayerGroup, int)
    BrushUserToolState<CellMineralsLayerGroup>.CanBeAppliedToManyPoints(int)
    BrushUserToolState<CellMineralsLayerGroup>.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
    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.Minerals
    Assembly: fwt.hexterrains.dll
    Syntax
    public class PaintCellMineralsUserToolState : BrushUserToolState<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen, CellMineralsLayer>, ISmState

    Constructors

    PaintCellMineralsUserToolState(ISmState)

    Declaration
    public PaintCellMineralsUserToolState(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

    Properties

    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

    IsRestrictCellHeight

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

    MaxSurfaceHeight

    Declaration
    public float MaxSurfaceHeight { get; set; }
    Property Value
    Type Description
    float

    MinSurfaceHeight

    Declaration
    public float MinSurfaceHeight { get; set; }
    Property Value
    Type Description
    float

    MineralIndex

    Declaration
    public virtual uint MineralIndex { get; set; }
    Property Value
    Type Description
    uint

    MineralsAmount

    Declaration
    public virtual float MineralsAmount { get; set; }
    Property Value
    Type Description
    float

    SurfaceLayerIndex

    Declaration
    public int SurfaceLayerIndex { get; set; }
    Property Value
    Type Description
    int

    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<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen, CellMineralsLayer>.TerrainLayerIndex

    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
    UserToolStateBase.UserToolType

    Methods

    ApplyBrush(int, int2, int, CellMineralsLayerGroup, int)

    Applies brush to the brushView. Returns true if changes were applied

    Declaration
    public override bool ApplyBrush(int brushMode, int2 cellCoord, int cellIndex, CellMineralsLayerGroup brushTarget, int mouseButton)
    Parameters
    Type Name Description
    int brushMode
    int2 cellCoord
    int cellIndex
    CellMineralsLayerGroup brushTarget
    int mouseButton
    Returns
    Type Description
    bool
    Overrides
    BrushUserToolState<CellMineralsLayerGroup>.ApplyBrush(int, int2, int, CellMineralsLayerGroup, 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<CellMineralsLayerGroup, 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<CellMineralsLayerGroup, UserToolSettingsDataSource, UniversalToolSettingsScreen, CellMineralsLayer>.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<CellMineralsLayerGroup>.IsAppliedToEveryCellOnMap(int)

    IsCellWithinSurfaceRestrictions(int)

    Declaration
    protected bool IsCellWithinSurfaceRestrictions(int cellIndex)
    Parameters
    Type Name Description
    int cellIndex
    Returns
    Type Description
    bool

    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<CellMineralsLayerGroup, 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(ColorMapCellValueDataLayer_UInt, CellValueDataLayer<float>)

    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(ColorMapCellValueDataLayer_UInt mineralIndexMap, CellValueDataLayer<float> mineralAmountMap)
    Parameters
    Type Name Description
    ColorMapCellValueDataLayer_UInt mineralIndexMap
    CellValueDataLayer<float> mineralAmountMap
    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<CellMineralsLayerGroup, 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