Table of Contents

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 ITerrain

The ITerrain to load new map data into.

fileName string

The file to load the map data from.

refreshHandler Action

Called when the presenter needs to be reset.

Fields

FileName

protected readonly string FileName

Field Value

string

Terrain

protected readonly ITerrain Terrain

Field Value

ITerrain

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()