Loading...
Searching...
No Matches
CityBuilderCore.MultiRoadManager Class Reference

Detailed Description

road manager implementation that can create seperate road networks for different Roads
it also creates a combined road network for walkers which do not specifiy which road they can walk on
the kind of Road a walker can walk on is specified in WalkerInfo.PathTag
roads are visualized on the Tilemap on the same gameobject as the manager

https://citybuilder.softleitner.com/manual/walkers

Inheritance diagram for CityBuilderCore.MultiRoadManager:
CityBuilderCore.RoadManagerBaseMulti CityBuilderCore.IRoadManager CityBuilderCore.IRoadPathfinder CityBuilderCore.IRoadGridLinker CityBuilderCore.ISaveData CityBuilderCore.IPathfinder CityBuilderCore.IGridLinker

Classes

class  Network
 helper that combines a road with the tilemap it is visualized on More...
 

Public Attributes

Network[] Networks
 
- Public Attributes inherited from CityBuilderCore.RoadManagerBaseMulti
GridPathfindingSettings PathfindingSettings
 

Protected Member Functions

override Dictionary< Road, RoadNetworkcreateNetworks ()
 
- Protected Member Functions inherited from CityBuilderCore.RoadManagerBaseMulti
virtual void Awake ()
 
virtual void Start ()
 
virtual void Update ()
 
virtual void OnDestroy ()
 
Dictionary< Road, RoadNetworkcreateNetworks ()
 

Additional Inherited Members

- Public Member Functions inherited from CityBuilderCore.RoadManagerBaseMulti
bool HasPoint (Vector2Int point, Road road=null)
 
void Add (IEnumerable< Vector2Int > points, Road road)
 
void Register (IEnumerable< Vector2Int > points, Road road)
 
void Deregister (IEnumerable< Vector2Int > points, Road road)
 
void RegisterSwitch (Vector2Int point, Road roadEntry, Road roadExit)
 
void RegisterSwitch (Vector2Int entry, Vector2Int point, Vector2Int exit, Road roadEntry, Road roadExit)
 
void Block (IEnumerable< Vector2Int > points, Road road=null)
 
void Unblock (IEnumerable< Vector2Int > points, Road road=null)
 
void BlockTags (IEnumerable< Vector2Int > points, IEnumerable< object > tags, Road road=null)
 
void UnblockTags (IEnumerable< Vector2Int > points, IEnumerable< object > tags, Road road=null)
 
void Remove (IEnumerable< Vector2Int > points)
 
IEnumerable< Vector2Int > GetPoints ()
 
bool HasPoint (Vector2Int point)
 
void CheckLayers (IEnumerable< Vector2Int > points)
 
bool CheckRequirement (Vector2Int point, RoadRequirement requirement)
 
string GetName ()
 
bool HasPoint (Vector2Int point, object tag=null)
 checks if a point exists within the pathfinder
for example points on map pathing that are blocked or points for road pathing that dont have a road
 
bool HasPointBlocked (Vector2Int point, object tag=null)
 
WalkingPath FindPath (Vector2Int[] starts, Vector2Int[] targets, object tag)
 attempts to find a path between one of the starts and one of the ends
 
WalkingPath FindPathBlocked (Vector2Int[] starts, Vector2Int[] targets, object tag)
 
PathQuery FindPathQuery (Vector2Int[] starts, Vector2Int[] targets, object tag)
 
PathQuery FindPathQueryBlocked (Vector2Int[] starts, Vector2Int[] targets, object tag)
 
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
 
string SaveData ()
 serializes the objects state(usually to json) and returns it
 
void LoadData (string json)
 deserializes the serialized json data and loads the data as its new state
 
- Properties inherited from CityBuilderCore.RoadManagerBaseMulti
bool IsDestructible [get]
 
bool IsDecorator [get]
 
bool IsWalkable [get]
 
bool IsAllowedOnRoads [get]
 
Transform Root [get]
 
StructureReference StructureReference [get, set]
 
- Events inherited from CityBuilderCore.RoadManagerBaseMulti
Action< PointsChanged< IStructure > > PositionsChanged