|
ClassicCityBuilderKit 1.9.4
|
combines multiple IUndoRedoAction into one
is passed around, for example, during demolish to collect all the different removal actions
Classes | |
| class | UndoRedoActionsData |
Public Member Functions | |
| UndoRedoActions (string name=null) | |
| UndoRedoActions (IEnumerable< IUndoRedoAction > actions, string name=null) | |
| void | Add (IUndoRedoAction action) |
| void | Undo () |
| undoes the action | |
| void | Redo () |
| redoes the action after it has been undone | |
| void | Push () |
| 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 | |
Static Public Member Functions | |
| static UndoRedoActions | Create (string name=null) |
Properties | |
| 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 | |
Properties inherited from CityBuilderCore.IUndoRedoAction | |
|
inline |
determines and returns the map points affected by this action
used, for example, to spawn particles at these points
Implements CityBuilderCore.IUndoRedoAction.
|
inline |
deserializes the serialized json data and loads the data as its new state
| json |
Implements CityBuilderCore.ISaveData.
|
inline |
redoes the action after it has been undone
Implements CityBuilderCore.IUndoRedoAction.
|
inline |
serializes the objects state(usually to json) and returns it
Implements CityBuilderCore.ISaveData.
|
inline |
undoes the action
Implements CityBuilderCore.IUndoRedoAction.
|
get |
whether the action is currently valid to be redone
Implements CityBuilderCore.IUndoRedoAction.
|
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.
|
get |
name of the action to be displayed in the ui(tooltip)
Implements CityBuilderCore.IUndoRedoAction.