ClassicCityBuilderKit 1.8.8
|
links two points on the map or a road network
registered with a IGridLinker so it can be found and added to pathfinding
when a walker actually moves across it control is handed to the link
Public Member Functions | |
void | Walk (Walker walker, float moved, Vector2Int start) |
walker movement is done here while a walker is traversing a link this can be used to move walkers in atypical ways for example when moving up ramps or across bridges | |
Properties | |
Vector2Int | StartPoint [get] |
start point of the link, if it changes the link has to be reregistered | |
Vector2Int | EndPoint [get] |
end point of the link, if it changes the link has to be reregistered | |
bool | Bidirectional [get] |
whether walkers can also move from end to start | |
int | Cost [get] |
cost of traversing the link in pathfinding, by default moving 1 point has cost 10 | |
float | Distance [get] |
length of the link when a walker moves through it, longer distance can make the walker slower | |
void CityBuilderCore.IGridLink.Walk | ( | Walker | walker, |
float | moved, | ||
Vector2Int | start ) |
walker movement is done here while a walker is traversing a link
this can be used to move walkers in atypical ways
for example when moving up ramps or across bridges
walker | the walker moving across the link |
moved | how much the walker has already moved |
start | the point the walker started at, relevant in bidirectional links |
Implemented in CityBuilderCore.ExpandableOffGridLink, and CityBuilderCore.OffGridLink.
|
get |
end point of the link, if it changes the link has to be reregistered
Implemented in CityBuilderCore.OffGridLink.
|
get |
start point of the link, if it changes the link has to be reregistered
Implemented in CityBuilderCore.OffGridLink.