ClassicCityBuilderKit 1.8.8
|
manager behaviour that takes care of buildings, walkers and their bars
Classes | |
class | BuildingMetaData |
class | BuildingsData |
Public Member Functions | |
T | Add< T > (Vector3 position, Quaternion rotation, T prefab, Action< T > initializer=null) |
creates a new building | |
int | Count (BuildingInfo info) |
int | Count (BuildingCategory category) |
IEnumerable< IBuilding > | GetBuildings () |
IEnumerable< IBuilding > | GetBuildings (BuildingCategory category) |
IEnumerable< IBuilding > | GetBuildings (BuildingInfo info) |
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 | |
Walker | GetWalker (Guid id) |
retrieves a walker by its id, can be used to get walker references when loading | |
IEnumerable< Walker > | GetWalkers () |
all the walkers currently active | |
void | RegisterWalker (Walker walker) |
registers a walker into the managers responsibility, called by walker on initialization | |
void | DeregisterWalker (Walker walker) |
deregisters a walker from the managers responsibility, called by walker on finish | |
IEnumerable< IBuilding > | GetBuilding (Vector2Int position) |
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 | |
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 | |
IEnumerable< T > | GetBuildingTraits< T > () |
void | ActivateBar (ViewBuildingBarBase view) |
activates a building bar and creates building value bars on every building that has the value | |
void | ActivateBar (ViewWalkerBarBase view) |
activates a walker bar and creates building value bars on every walker that has the value | |
void | DeactivateBar (ViewBuildingBarBase view) |
deactivates a building bar and destroys all the bars that were created | |
void | DeactivateBar (ViewWalkerBarBase view) |
deactivates a walker bar and destroys all the bars that were created | |
bool | HasEvolutionDelay (bool direction) |
float | GetEvolutionDelay (bool direction) |
string | AddEvolutionAddon (IBuilding building, bool direction) |
string | AddSuspensionAddon (IBuilding building) |
string | SaveData () |
void | LoadData (string json) |
Public Attributes | |
BuildingAddon | AddingAddon |
BuildingAddon | SuspensionAddon |
float | EvolutionDelay |
BuildingAddon | EvolutionDelayAddon |
float | DevolutionDelay |
BuildingAddon | DevolutionDelayAddon |
Transform | BarRoot |
Protected Member Functions | |
virtual void | Awake () |
virtual void | Update () |
Events | |
Action< IBuilding > | Added |
Action< IBuilding > | Registered |
Action< IBuilding > | Deregistered |
Action< Walker > | WalkerRegistered |
Action< Walker > | WalkerDeregistered |
Events inherited from CityBuilderCore.IBuildingManager | |
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) | |
Events inherited from CityBuilderCore.IWalkerManager | |
Action< Walker > | WalkerRegistered |
fired when a new walker is registered(happens during initializion) | |
Action< Walker > | WalkerDeregistered |
fired when a walker gets deregistered(happens during finish) | |
|
inline |
activates a building bar and creates building value bars on every building that has the value
view | the view that will be activated |
Implements CityBuilderCore.IBarManager.
|
inline |
activates a walker bar and creates building value bars on every walker that has the value
view | the view that will be activated |
Implements CityBuilderCore.IBarManager.
|
inline |
creates a new building
T |
origin | |
rotation | |
prefab |
Implements CityBuilderCore.IBuildingManager.
T | : | Building |
|
inline |
Implements CityBuilderCore.IBuildingManager.
|
inline |
Implements CityBuilderCore.IBuildingManager.
int CityBuilderCore.DefaultBuildingManager.Count | ( | BuildingCategory | category | ) |
Implements CityBuilderCore.IBuildingManager.
int CityBuilderCore.DefaultBuildingManager.Count | ( | BuildingInfo | info | ) |
Implements CityBuilderCore.IBuildingManager.
|
inline |
deactivates a building bar and destroys all the bars that were created
view | the view that will be deactivated |
Implements CityBuilderCore.IBarManager.
|
inline |
deactivates a walker bar and destroys all the bars that were created
view | the view that will be deactivated |
Implements CityBuilderCore.IBarManager.
|
inline |
deregisters a building from the managers responsibility, called by building on termination
building |
Implements CityBuilderCore.IBuildingManager.
|
inline |
deregister a trait from the manager, called by the component on termination
T |
component |
Implements CityBuilderCore.IBuildingManager.
T | : | IBuildingTrait<T> |
|
inline |
deregisters a walker from the managers responsibility, called by walker on finish
walker |
Implements CityBuilderCore.IWalkerManager.
|
inline |
returns a building at the point, can be any point in the building not just the origin
point |
Implements CityBuilderCore.IBuildingManager.
BuildingReference CityBuilderCore.DefaultBuildingManager.GetBuildingReference | ( | Guid | id | ) |
retrieve building by its id, may be used to get building references when loading
id |
Implements CityBuilderCore.IBuildingManager.
IEnumerable< IBuilding > CityBuilderCore.DefaultBuildingManager.GetBuildings | ( | ) |
Implements CityBuilderCore.IBuildingManager.
IEnumerable< IBuilding > CityBuilderCore.DefaultBuildingManager.GetBuildings | ( | BuildingCategory | category | ) |
Implements CityBuilderCore.IBuildingManager.
IEnumerable< IBuilding > CityBuilderCore.DefaultBuildingManager.GetBuildings | ( | BuildingInfo | info | ) |
Implements CityBuilderCore.IBuildingManager.
|
inline |
Implements CityBuilderCore.IBuildingManager.
T | : | IBuildingTrait<T> |
|
inline |
Implements CityBuilderCore.IBuildingManager.
Walker CityBuilderCore.DefaultBuildingManager.GetWalker | ( | Guid | id | ) |
retrieves a walker by its id, can be used to get walker references when loading
id | unique identifier of the walker |
Implements CityBuilderCore.IWalkerManager.
IEnumerable< Walker > CityBuilderCore.DefaultBuildingManager.GetWalkers | ( | ) |
all the walkers currently active
Implements CityBuilderCore.IWalkerManager.
|
inline |
Implements CityBuilderCore.IBuildingManager.
|
inline |
Implements CityBuilderCore.IBuildingManager.
|
inline |
registers a building into the managers responsibility, called by building on initialization
building |
Implements CityBuilderCore.IBuildingManager.
|
inline |
registers a trait with the manager so the trait can be easily retrieved from outside
T |
component |
Implements CityBuilderCore.IBuildingManager.
T | : | IBuildingTrait<T> |
|
inline |
registers a walker into the managers responsibility, called by walker on initialization
walker |
Implements CityBuilderCore.IWalkerManager.
|
inline |
replace a trait in its reference or remove it if there is no replacement, called by the component on replacement
T |
component | |
replacement |
Implements CityBuilderCore.IBuildingManager.
T | : | IBuildingTrait<T> |
|
inline |
Implements CityBuilderCore.IBuildingManager.