Class ChangeTerrainTemplate<TTemplate>
- Namespace
- AlphaFramework.Editor.World.Commands
- Assembly
- AlphaFramework.Editor.dll
Changes a terrain Template<TSelf> on a Terrain<TTemplate>s.
public class ChangeTerrainTemplate<TTemplate> : SimpleCommand, IUndoCommand where TTemplate : Template<TTemplate>
Type Parameters
TTemplate
- Inheritance
-
ChangeTerrainTemplate<TTemplate>
- Implements
- Inherited Members
- Extension Methods
Constructors
ChangeTerrainTemplate(Terrain<TTemplate>, int, string, Action)
Creates a new command for changing a Template<TSelf> on a Terrain<TTemplate>.
public ChangeTerrainTemplate(Terrain<TTemplate> terrain, int templateIndex, string templateName, Action refreshHandler)
Parameters
terrainTerrain<TTemplate>The Terrain<TTemplate> to modify.
templateIndexintThe index in Templates to set.
templateNamestringThe name of the new
TTemplateto set.refreshHandlerActionCalled when the Terrain<TTemplate> needs to be reset.
Methods
OnExecute()
Template method to perform the desired action.
protected override void OnExecute()
OnUndo()
Template method to undo the changes made by OnExecute().
protected override void OnUndo()