ClassicCityBuilderKit 1.8.8
|
the component that tracks all the buildings in the game
Public Member Functions | |
T | Add< T > (Vector3 position, Quaternion rotation, T prefab, Action< T > initializer=null) |
creates a new building | |
void | RegisterBuilding (IBuilding building) |
registers a building into the managers responsibility, called by building on initialization | |
void | DeregisterBuilding (IBuilding building) |
deregisters a building from the managers responsibility, called by building on termination | |
BuildingComponentReference< T > | RegisterBuildingTrait< T > (T component) |
registers a trait with the manager so the trait can be easily retrieved from outside | |
void | ReplaceBuildingTrait< T > (T component, T replacement) |
replace a trait in its reference or remove it if there is no replacement, called by the component on replacement | |
void | DeregisterBuildingTrait< T > (T component) |
deregister a trait from the manager, called by the component on termination | |
int | Count (BuildingInfo info) |
int | Count (BuildingCategory buildingCategory) |
IEnumerable< IBuilding > | GetBuilding (Vector2Int point) |
returns a building at the point, can be any point in the building not just the origin | |
BuildingReference | GetBuildingReference (Guid id) |
retrieve building by its id, may be used to get building references when loading | |
IEnumerable< IBuilding > | GetBuildings () |
IEnumerable< IBuilding > | GetBuildings (BuildingCategory category) |
IEnumerable< IBuilding > | GetBuildings (BuildingInfo info) |
IEnumerable< T > | GetBuildingTraits< T > () |
bool | HasEvolutionDelay (bool direction) |
float | GetEvolutionDelay (bool direction) |
string | AddEvolutionAddon (IBuilding building, bool direction) |
string | AddSuspensionAddon (IBuilding building) |
string | SaveData () |
void | LoadData (string json) |
Events | |
Action< IBuilding > | Added |
fired after a new building has been instantiated and initialized | |
Action< IBuilding > | Registered |
fired when a new building is registered(happens during initializion) | |
Action< IBuilding > | Deregistered |
fired when a building gets deregistered(happens during termination) | |
T CityBuilderCore.IBuildingManager.Add< T > | ( | Vector3 | position, |
Quaternion | rotation, | ||
T | prefab, | ||
Action< T > | initializer = null ) |
creates a new building
T |
origin | |
rotation | |
prefab |
Implemented in CityBuilderCore.DefaultBuildingManager.
T | : | Building |
void CityBuilderCore.IBuildingManager.DeregisterBuilding | ( | IBuilding | building | ) |
deregisters a building from the managers responsibility, called by building on termination
building |
Implemented in CityBuilderCore.DefaultBuildingManager.
void CityBuilderCore.IBuildingManager.DeregisterBuildingTrait< T > | ( | T | component | ) |
deregister a trait from the manager, called by the component on termination
T |
component |
Implemented in CityBuilderCore.DefaultBuildingManager.
T | : | IBuildingTrait<T> |
IEnumerable< IBuilding > CityBuilderCore.IBuildingManager.GetBuilding | ( | Vector2Int | point | ) |
returns a building at the point, can be any point in the building not just the origin
point |
Implemented in CityBuilderCore.DefaultBuildingManager.
BuildingReference CityBuilderCore.IBuildingManager.GetBuildingReference | ( | Guid | id | ) |
retrieve building by its id, may be used to get building references when loading
id |
Implemented in CityBuilderCore.DefaultBuildingManager.
IEnumerable< T > CityBuilderCore.IBuildingManager.GetBuildingTraits< T > | ( | ) |
T | : | IBuildingTrait<T> |
void CityBuilderCore.IBuildingManager.RegisterBuilding | ( | IBuilding | building | ) |
registers a building into the managers responsibility, called by building on initialization
building |
Implemented in CityBuilderCore.DefaultBuildingManager.
BuildingComponentReference< T > CityBuilderCore.IBuildingManager.RegisterBuildingTrait< T > | ( | T | component | ) |
registers a trait with the manager so the trait can be easily retrieved from outside
T |
component |
Implemented in CityBuilderCore.DefaultBuildingManager.
T | : | IBuildingTrait<T> |
void CityBuilderCore.IBuildingManager.ReplaceBuildingTrait< T > | ( | T | component, |
T | replacement ) |
replace a trait in its reference or remove it if there is no replacement, called by the component on replacement
T |
component | |
replacement |
Implemented in CityBuilderCore.DefaultBuildingManager.
T | : | IBuildingTrait<T> |