base class for IUndoRedoAction that adds or removes items from global storage
|
|
| UndoRedoGlobalItems (ItemQuantity items) |
| |
|
| UndoRedoGlobalItems (Item item, int quantity) |
| |
|
void | Combine (UndoRedoGlobalItems other) |
| |
| override void | Undo () |
| | undoes the action
|
| |
| override void | Redo () |
| | redoes the action after it 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
|
| |
| void | Undo () |
| | undoes the action
|
| |
| void | Redo () |
| | redoes the action after it has been undone
|
| |
| virtual IEnumerable< Vector2Int > | GetPoints () |
| | determines and returns the map points affected by this action
used, for example, to spawn particles at these points
|
| |
| string | SaveData () |
| | serializes the objects state(usually to json) and returns it
|
| |
| void | LoadData (string json) |
| | deserializes the serialized json data and loads the data as its new state
|
| |
|
| override string | Name [get] |
| | name of the action to be displayed in the ui(tooltip)
|
| |
| override bool | CanUndo [get] |
| | whether the action is currently valid to be undone
for example building a hut cannot be undone if that hut has since been destroyed
|
| |
| override bool | CanRedo [get] |
| | whether the action is currently valid to be redone
|
| |
| string | Name [get] |
| | name of the action to be displayed in the ui(tooltip)
|
| |
| virtual bool | CanUndo [get] |
| | whether the action is currently valid to be undone
for example building a hut cannot be undone if that hut has since been destroyed
|
| |
| virtual bool | CanRedo [get] |
| | whether the action is currently valid to be redone
|
| |
◆ LoadData()
| override void CityBuilderCore.UndoRedoGlobalItems.LoadData |
( |
string | json | ) |
|
|
inline |
◆ Redo()
| override void CityBuilderCore.UndoRedoGlobalItems.Redo |
( |
| ) |
|
|
inline |
◆ SaveData()
| override string CityBuilderCore.UndoRedoGlobalItems.SaveData |
( |
| ) |
|
|
inline |
serializes the objects state(usually to json) and returns it
- Returns
- serialized save data
Implements CityBuilderCore.ISaveData.
◆ Undo()
| override void CityBuilderCore.UndoRedoGlobalItems.Undo |
( |
| ) |
|
|
inline |
◆ CanRedo
| override bool CityBuilderCore.UndoRedoGlobalItems.CanRedo |
|
get |
◆ CanUndo
| override bool CityBuilderCore.UndoRedoGlobalItems.CanUndo |
|
get |
whether the action is currently valid to be undone
for example building a hut cannot be undone if that hut has since been destroyed
Implements CityBuilderCore.IUndoRedoAction.
◆ Name
| override string CityBuilderCore.UndoRedoGlobalItems.Name |
|
get |