C# Class Sharplike.Editlike.MapTools.SquareChange

SquareChange denotes an undo/redo operation involving the changing of map squares.
In general this class should be run as part of a map tool that operates on squares. It should be constructed in Start() and applied to the undo/redo stack during End().
Inheritance: UndoStack.Change
Afficher le fichier Open project: eropple/sharplike Class Usage Examples

Méthodes publiques

Méthode Description
AddOperation ( AbstractSquare oldSquare, AbstractSquare newSquare, System.Vector3 location ) : void

Adds a square change operation. This does not actually change the square, but rather stores the modification for handing in undo and redo.

SquareChange ( AbstractMap map ) : System

Creates a new change batch targeting the specified map.

Private Methods

Méthode Description
PenChange_OnRedo ( object sender, EventArgs e ) : void
PenChange_OnUndo ( object sender, EventArgs e ) : void

Method Details

AddOperation() public méthode

Adds a square change operation. This does not actually change the square, but rather stores the modification for handing in undo and redo.
public AddOperation ( AbstractSquare oldSquare, AbstractSquare newSquare, System.Vector3 location ) : void
oldSquare Sharplike.Mapping.AbstractSquare The square that was previously at the map location.
newSquare Sharplike.Mapping.AbstractSquare The new square being placed at the map location.
location System.Vector3 The location on the map that this operation takes place.
Résultat void

SquareChange() public méthode

Creates a new change batch targeting the specified map.
public SquareChange ( AbstractMap map ) : System
map AbstractMap The map that we're changing squares on.
Résultat System