ClassicCityBuilderKit 1.9.2
|
represents an action that can be undone and redone using an IUndoRedoStack
Public Member Functions | |
void | Undo () |
undoes the action | |
void | Redo () |
redoes the action after it has been undone | |
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 | |
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 | |
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) | |
IEnumerable< Vector2Int > CityBuilderCore.IUndoRedoAction.GetPoints | ( | ) |
determines and returns the map points affected by this action
used, for example, to spawn particles at these points
Implemented in CityBuilderCore.RoadNetwork.UndoRedoRoadBase, CityBuilderCore.StructureCollectionFloat.UndoRedoStructureCollectionFloatBase, CityBuilderCore.StructureTerrainTrees.UndoRedoStructureTerrainTreesBase, CityBuilderCore.StructureTerrainTreeVariants.UndoRedoStructureTerrainTreeVariantsBase, CityBuilderCore.UndoRedoActionBase, CityBuilderCore.UndoRedoActionBuildingBase, CityBuilderCore.UndoRedoActions, and CityBuilderCore.UndoRedoActionStructureBase.
void CityBuilderCore.IUndoRedoAction.Redo | ( | ) |
redoes the action after it has been undone
Implemented in CityBuilderCore.BuildingAddition, CityBuilderCore.BuildingRemoval, CityBuilderCore.RoadNetwork.RoadAddition, CityBuilderCore.RoadNetwork.RoadRemoval, CityBuilderCore.StructureAddition, CityBuilderCore.StructureCollectionFloat.StructureCollectionFloatAddition, CityBuilderCore.StructureCollectionFloat.StructureCollectionFloatRemoval, CityBuilderCore.StructureRemoval, CityBuilderCore.StructureTerrainTrees.StructureTerrainTreesAddition, CityBuilderCore.StructureTerrainTrees.StructureTerrainTreesRemoval, CityBuilderCore.StructureTerrainTreeVariants.StructureTerrainTreeVariantsAddition, CityBuilderCore.StructureTerrainTreeVariants.StructureTerrainTreeVariantsRemoval, CityBuilderCore.UndoRedoActionBase, CityBuilderCore.UndoRedoActions, and CityBuilderCore.UndoRedoGlobalItems.
void CityBuilderCore.IUndoRedoAction.Undo | ( | ) |
undoes the action
Implemented in CityBuilderCore.BuildingAddition, CityBuilderCore.BuildingRemoval, CityBuilderCore.RoadNetwork.RoadAddition, CityBuilderCore.RoadNetwork.RoadRemoval, CityBuilderCore.StructureAddition, CityBuilderCore.StructureCollectionFloat.StructureCollectionFloatAddition, CityBuilderCore.StructureCollectionFloat.StructureCollectionFloatRemoval, CityBuilderCore.StructureRemoval, CityBuilderCore.StructureTerrainTrees.StructureTerrainTreesAddition, CityBuilderCore.StructureTerrainTrees.StructureTerrainTreesRemoval, CityBuilderCore.StructureTerrainTreeVariants.StructureTerrainTreeVariantsAddition, CityBuilderCore.StructureTerrainTreeVariants.StructureTerrainTreeVariantsRemoval, CityBuilderCore.UndoRedoActionBase, CityBuilderCore.UndoRedoActions, and CityBuilderCore.UndoRedoGlobalItems.
|
get |
whether the action is currently valid to be redone
Implemented in CityBuilderCore.BuildingRemoval, CityBuilderCore.UndoRedoActionBase, CityBuilderCore.UndoRedoActions, and CityBuilderCore.UndoRedoGlobalItems.
|
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
Implemented in CityBuilderCore.BuildingAddition, CityBuilderCore.UndoRedoActionBase, CityBuilderCore.UndoRedoActions, and CityBuilderCore.UndoRedoGlobalItems.
|
get |
name of the action to be displayed in the ui(tooltip)
Implemented in CityBuilderCore.BuildingAddition, CityBuilderCore.BuildingRemoval, CityBuilderCore.RoadNetwork.RoadAddition, CityBuilderCore.RoadNetwork.RoadRemoval, CityBuilderCore.StructureAddition, CityBuilderCore.StructureCollectionFloat.StructureCollectionFloatAddition, CityBuilderCore.StructureCollectionFloat.StructureCollectionFloatRemoval, CityBuilderCore.StructureRemoval, CityBuilderCore.StructureTerrainTrees.StructureTerrainTreesAddition, CityBuilderCore.StructureTerrainTrees.StructureTerrainTreesRemoval, CityBuilderCore.StructureTerrainTreeVariants.StructureTerrainTreeVariantsAddition, CityBuilderCore.StructureTerrainTreeVariants.StructureTerrainTreeVariantsRemoval, CityBuilderCore.UndoRedoActionBase, CityBuilderCore.UndoRedoActions, and CityBuilderCore.UndoRedoGlobalItems.