default implementation for the resource systems
manages global items as well as finding the right givers, receivers and dispensers for items
https://citybuilder.softleitner.com/manual/resources
|
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
|
|
BuildingComponentPath< IItemGiver > | GetGiverPath (IBuilding building, Vector2Int? currentPoint, ItemQuantity items, float maxDistance, PathType pathType, object pathTag=null) |
| attempts to find an IItemGiver and a path to it for a needed item
|
|
BuildingComponentPathQuery< IItemGiver > | GetGiverPathQuery (IBuilding building, Vector2Int? currentPoint, ItemQuantity items, float maxDistance, PathType pathType, object pathTag=null) |
|
BuildingComponentPath< IItemReceiver > | GetReceiverPath (IBuilding building, Vector2Int? currentPoint, ItemQuantity items, float maxDistance, PathType pathType, object pathTag=null, int currentPriority=0) |
| attempts to find a receiver and a path to it for an item a walker wants to deliver
|
|
BuildingComponentPathQuery< IItemReceiver > | GetReceiverPathQuery (IBuilding building, Vector2Int? currentPoint, ItemQuantity items, float maxDistance, PathType pathType, object pathTag=null, int currentPriority=0) |
|
|
virtual void | Awake () |
|
virtual void | Start () |
|
virtual bool | isValid (IBuilding building, ItemQuantity items, IItemGiver giver) |
|
virtual bool | isValid (IBuilding building, ItemQuantity items, IItemReceiver receiver, int currentPriority=0) |
|
virtual bool | isDiscarded (ItemQuantity items, IItemGiver currentGiver, float currentPathDistance, IItemGiver potentialGiver, float potentialBuildingDistance) |
|
virtual bool | isDiscarded (ItemQuantity items, IItemReceiver currentReceiver, float currentPathDistance, IItemReceiver potentialReceiver, float potentialBuildingDistance) |
|
virtual bool | isMoreImportant (ItemQuantity items, IItemGiver currentGiver, float currentPathDistance, IItemGiver potentialGiver, float potentialPathDistance) |
|
virtual bool | isMoreImportant (ItemQuantity items, IItemReceiver currentReceiver, float currentPathDistance, IItemReceiver potentialReceiver, float potentialPathDistance) |
|