ClassicCityBuilderKit 1.8.8
|
handles connections and their values
Public Member Functions | |
void | Calculate () |
can be used to force calculation if the value of a connection is needed directly after changing it | |
void | Register (IConnectionPasser passer) |
registers a passer with the manager, the passers points can now be used by its connection and it will be notified if any of its values changed | |
void | Deregister (IConnectionPasser passer) |
removes a passer with its points from connection handling | |
bool | HasPoint (Connection connection, Vector2Int point) |
checks if a connection has a point regardless of its value | |
int | GetValue (Connection connection, Vector2Int point) |
gets the value of the connection at the specified point | |
Dictionary< Vector2Int, int > | GetValues (Connection connection) |
returns all positions and values of a layer where the value differs from 0 | |
ConnectionGrid | GetGrid (Connection connection) |
Events | |
Action< Connection > | Changed |
fired whenever the points of a connection have changed | |
void CityBuilderCore.IConnectionManager.Calculate | ( | ) |
can be used to force calculation if the value of a connection is needed directly after changing it
Implemented in CityBuilderCore.DefaultConnectionManager.
void CityBuilderCore.IConnectionManager.Deregister | ( | IConnectionPasser | passer | ) |
removes a passer with its points from connection handling
passer | the passer that should no longer contribute to connections |
Implemented in CityBuilderCore.DefaultConnectionManager.
ConnectionGrid CityBuilderCore.IConnectionManager.GetGrid | ( | Connection | connection | ) |
int CityBuilderCore.IConnectionManager.GetValue | ( | Connection | connection, |
Vector2Int | point ) |
gets the value of the connection at the specified point
connection | the connection to check |
point | the point at which we want to know the value |
Implemented in CityBuilderCore.DefaultConnectionManager.
Dictionary< Vector2Int, int > CityBuilderCore.IConnectionManager.GetValues | ( | Connection | connection | ) |
returns all positions and values of a layer where the value differs from 0
layer |
Implemented in CityBuilderCore.DefaultConnectionManager.
bool CityBuilderCore.IConnectionManager.HasPoint | ( | Connection | connection, |
Vector2Int | point ) |
checks if a connection has a point regardless of its value
connection | the connection to check |
point | the point at which to check |
Implemented in CityBuilderCore.DefaultConnectionManager.
void CityBuilderCore.IConnectionManager.Register | ( | IConnectionPasser | passer | ) |
registers a passer with the manager, the passers points can now be used by its connection and it will be notified if any of its values changed
passer | the passer that should contribute to connections |
Implemented in CityBuilderCore.DefaultConnectionManager.