Class ImportMap<T>
- Namespace
- AlphaFramework.Editor.World.Commands
- Assembly
- AlphaFramework.Editor.dll
Abstract base class for commands that load new map data into a ITerrain.
public abstract class ImportMap<T> : FirstExecuteCommand, IUndoCommand where T : class
Type Parameters
T
The type of the map data to be imported.
- Inheritance
-
ImportMap<T>
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
ImportMap(ITerrain, string, Action)
Creates a new command for loading map data into a ITerrain.
protected ImportMap(ITerrain terrain, string fileName, Action refreshHandler)
Parameters
terrain
ITerrainThe ITerrain to load new map data into.
fileName
stringThe file to load the map data from.
refreshHandler
ActionCalled when the presenter needs to be reset.
Fields
FileName
protected readonly string FileName
Field Value
Terrain
protected readonly ITerrain Terrain
Field Value
Properties
MapData
Override to point to the appropriate ITerrain array map
protected abstract T MapData { get; set; }
Property Value
- T
Methods
LoadMap()
Override to load the map data from a file into the ITerrain
protected abstract void LoadMap()
OnFirstExecute()
Imports the map data
protected override void OnFirstExecute()
OnRedo()
Restores the imported map data
protected override void OnRedo()
OnUndo()
Restores the original map data
protected override void OnUndo()