Class ToggleTerrainVisibilityUserToolState
Represents the user tool state that toggles the visibility of terrain in the hex-based environment.
Inheritance
Implements
Inherited Members
Namespace: Fwt.HexTerrains.UserTools.SM.States
Assembly: fwt.hexterrains.dll
Syntax
public class ToggleTerrainVisibilityUserToolState : HexTerrainUserToolStateBase, ISmState
Remarks
This state is typically activated when the user selects the tool to show or hide terrain. After toggling terrain visibility, the state automatically switches back to the pointer tool. This class is intended to be used within a state machine managing user tool interactions.
Constructors
ToggleTerrainVisibilityUserToolState(ISmState)
Declaration
public ToggleTerrainVisibilityUserToolState(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
PrepareToRun()
Performs any necessary initialization or setup required before executing the main operation. Called by state machine once when state becomes active. If state is disabled and then enabled again, this method will be called again.
Declaration
public override void PrepareToRun()
Overrides
Remarks
Override this method to implement preparation logic specific to the derived class. This method should be called prior to running the core functionality to ensure all prerequisites are met.