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
terrain
Terrain<TTemplate>The Terrain<TTemplate> to modify.
templateIndex
intThe index in Templates to set.
templateName
stringThe name of the new
TTemplate
to set.refreshHandler
ActionCalled 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()