|
ClassicCityBuilderKit 1.9.4
|
abstract base class for IUndoRedoAction that provides default implementations for some functions
Public Member Functions | |
| 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 | |
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 | |
|
virtual |
determines and returns the map points affected by this action
used, for example, to spawn particles at these points
Implements CityBuilderCore.IUndoRedoAction.
Reimplemented in CityBuilderCore.RoadNetwork.UndoRedoRoadBase, CityBuilderCore.StructureCollectionFloat.UndoRedoStructureCollectionFloatBase, CityBuilderCore.StructureTerrainTrees.UndoRedoStructureTerrainTreesBase, CityBuilderCore.StructureTerrainTreeVariants.UndoRedoStructureTerrainTreeVariantsBase, CityBuilderCore.UndoRedoActionBuildingBase, and CityBuilderCore.UndoRedoActionStructureBase.
|
abstract |
deserializes the serialized json data and loads the data as its new state
| json |
Implements CityBuilderCore.ISaveData.
|
abstract |
redoes the action after it has been undone
Implements CityBuilderCore.IUndoRedoAction.
|
abstract |
serializes the objects state(usually to json) and returns it
Implements CityBuilderCore.ISaveData.
|
abstract |
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.
|
getabstract |
name of the action to be displayed in the ui(tooltip)
Implements CityBuilderCore.IUndoRedoAction.