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
terrainITerrainThe ITerrain to modify.
refreshHandlerActionCalled when the Terrain needs to be reset.
textureIDbyteThe 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
terrainCoordsVector2The center coordinates of the area to modify in world space.
brushTerrainBrushThe shape and size of the area around
terrainCoordsto modify.
GetCommand()
Creates a pre-executed undo command representing the accumulated Apply(Vector2, TerrainBrush) calls to this instance.
public override IUndoCommand GetCommand()