Class Texture
- Namespace
- AlphaFramework.Editor.World.TerrainModifiers
- Assembly
- AlphaFramework.Editor.dll
Interactively changes the texture ID of an area on a ITerrain.
public sealed class Texture : Base
- Inheritance
-
Texture
- Inherited Members
- Extension Methods
Constructors
Texture(ITerrain, Action, byte)
Creates a new texture index modifier.
public Texture(ITerrain terrain, Action refreshHandler, byte textureID)
Parameters
terrain
ITerrainThe ITerrain to modify.
refreshHandler
ActionCalled when the Terrain needs to be reset.
textureID
byteThe new texture ID to set.
Methods
Apply(Vector2, TerrainBrush)
Applies and accumulates a modification to the Terrain.
public override void Apply(Vector2 terrainCoords, TerrainBrush brush)
Parameters
terrainCoords
Vector2The center coordinates of the area to modify in world space.
brush
TerrainBrushThe shape and size of the area around
terrainCoords
to modify.
GetCommand()
Creates a pre-executed undo command representing the accumulated Apply(Vector2, TerrainBrush) calls to this instance.
public override IUndoCommand GetCommand()