ClassicCityBuilderKit 1.8.8
|
keeps track of all the IItemsDispenser and calculates the dispenser a retriever goes for
Public Member Functions | |
void | Add (IItemsDispenser dispenser) |
adds a dispenser to the manager so it can be found by retrievers | |
void | Remove (IItemsDispenser dispenser) |
removes a previously added retriever so it can no longer be found be retrievers | |
IItemsDispenser | GetDispenser (string key, Vector3 position, float maxDistance) |
looks for the closest dispenser that has the right key | |
bool | HasDispenser (string key, Vector3 position, float maxDistance) |
checks if there is a dispenser with the right key in the vicinity | |
void CityBuilderCore.IItemsDispenserManager.Add | ( | IItemsDispenser | dispenser | ) |
adds a dispenser to the manager so it can be found by retrievers
dispenser | the retrievers to add |
Implemented in CityBuilderCore.DefaultItemManager.
IItemsDispenser CityBuilderCore.IItemsDispenserManager.GetDispenser | ( | string | key, |
Vector3 | position, | ||
float | maxDistance ) |
looks for the closest dispenser that has the right key
key | key used to discern different types of dispensers(rock, tree, gold, ...) |
position | absolute world position of the retriever |
maxDistance | maximum distance between dispenser and retriever |
Implemented in CityBuilderCore.DefaultItemManager.
bool CityBuilderCore.IItemsDispenserManager.HasDispenser | ( | string | key, |
Vector3 | position, | ||
float | maxDistance ) |
checks if there is a dispenser with the right key in the vicinity
key | key used to discern different types of dispensers(rock, tree, gold, ...) |
position | absolute world position of the retriever |
maxDistance | maximum distance between dispenser and retriever |
Implemented in CityBuilderCore.DefaultItemManager.
void CityBuilderCore.IItemsDispenserManager.Remove | ( | IItemsDispenser | dispenser | ) |
removes a previously added retriever so it can no longer be found be retrievers
dispenser | the dispenser to remove |
Implemented in CityBuilderCore.DefaultItemManager.