C# Класс 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().
Наследование: UndoStack.Change
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
PenChange_OnRedo ( object sender, EventArgs e ) : void
PenChange_OnUndo ( object sender, EventArgs e ) : void

Описание методов

AddOperation() публичный Метод

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.
Результат void

SquareChange() публичный Метод

Creates a new change batch targeting the specified map.
public SquareChange ( AbstractMap map ) : System
map AbstractMap The map that we're changing squares on.
Результат System