|
| void | Push (IUndoRedoAction action) |
| | puts an action into the stack
it is now the next action that will be undone
|
| |
| void | Undo () |
| | undoes the top action in the undo stack
|
| |
| void | Redo () |
| | redoes the last action that has been undone
|
| |
| override string | SaveData () |
| | serializes the objects state(usually to json) and returns it
|
| |
| override void | LoadData (string json) |
| | deserializes the serialized json data and loads the data as its new state
|
| |
|
| bool | CanUndo [get] |
| | an action that can be undone is present and valid
|
| |
| bool | CanRedo [get] |
| | an action that can be redone is present and valid
|
| |
◆ LoadData()
| override void CityBuilderCore.UndoRedoStack.LoadData |
( |
string | json | ) |
|
|
inline |
◆ Push()
puts an action into the stack
it is now the next action that will be undone
- Parameters
-
| action | the action representing some process just performed by the player |
Implements CityBuilderCore.IUndoRedoStack.
◆ Redo()
| void CityBuilderCore.UndoRedoStack.Redo |
( |
| ) |
|
|
inline |
◆ SaveData()
| override string CityBuilderCore.UndoRedoStack.SaveData |
( |
| ) |
|
|
inline |
serializes the objects state(usually to json) and returns it
- Returns
- serialized save data
Implements CityBuilderCore.ISaveData.
◆ Undo()
| void CityBuilderCore.UndoRedoStack.Undo |
( |
| ) |
|
|
inline |
◆ CanRedo
| bool CityBuilderCore.UndoRedoStack.CanRedo |
|
get |
◆ CanUndo
| bool CityBuilderCore.UndoRedoStack.CanUndo |
|
get |