Loading...
Searching...
No Matches
CityBuilderCore.IGridLinker Interface Reference

Detailed Description

common interface for objects that handle grid links
made for convenience so road and map linking is interchangable

Inheritance diagram for CityBuilderCore.IGridLinker:
CityBuilderCore.IMapGridLinker CityBuilderCore.IRoadGridLinker CityBuilderCore.StructurePaths CityBuilderCore.RoadManagerBase CityBuilderCore.RoadManagerBaseMulti CityBuilderCore.DefaultRoadManager CityBuilderCore.TerrainRoadManager CityBuilderCore.MultiRoadManager

Public Member Functions

void RegisterLink (IGridLink link, object tag)
 adds a link to the linker
 
void DeregisterLink (IGridLink link, object tag)
 removes a link from the linker
 
IEnumerable< IGridLinkGetLinks (Vector2Int start, object tag)
 retrieves all links starting at a specific point
 
IGridLink GetLink (Vector2Int start, Vector2Int end, object tag)
 retrieves a link connecting two specific points if one exists
 

Member Function Documentation

◆ DeregisterLink()

void CityBuilderCore.IGridLinker.DeregisterLink ( IGridLink link,
object tag )

removes a link from the linker

Parameters
linkthe link to be removed
tagadditional information, for example the Road when the link should be removed to a specific road network

Implemented in CityBuilderCore.RoadManagerBase, CityBuilderCore.RoadManagerBaseMulti, and CityBuilderCore.StructurePaths.

◆ GetLink()

IGridLink CityBuilderCore.IGridLinker.GetLink ( Vector2Int start,
Vector2Int end,
object tag )

retrieves a link connecting two specific points if one exists

Parameters
startstart point of the potential link
endend point of the potential link
tagadditional parameter
Returns

Implemented in CityBuilderCore.RoadManagerBase, CityBuilderCore.RoadManagerBaseMulti, and CityBuilderCore.StructurePaths.

◆ GetLinks()

IEnumerable< IGridLink > CityBuilderCore.IGridLinker.GetLinks ( Vector2Int start,
object tag )

retrieves all links starting at a specific point

Parameters
startthe point at which to look for lniks
tagadditional parameter
Returns

Implemented in CityBuilderCore.RoadManagerBase, CityBuilderCore.RoadManagerBaseMulti, and CityBuilderCore.StructurePaths.

◆ RegisterLink()

void CityBuilderCore.IGridLinker.RegisterLink ( IGridLink link,
object tag )

adds a link to the linker

Parameters
linkthe link to be added
tagadditional information, for example the Road when the link should be added to a specific road network

Implemented in CityBuilderCore.RoadManagerBase, CityBuilderCore.RoadManagerBaseMulti, and CityBuilderCore.StructurePaths.