Loading...
Searching...
No Matches
CityBuilderCore.ConnectionPasserBase Class Referenceabstract

Detailed Description

base class for any behaviour that might pass a connection
passers perpetuate a connection at their points and get notified when any of these changes its connection value
this can be used for things that link up connections(pipes, wires, ..) and also things that use that connection(households)

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

Inheritance diagram for CityBuilderCore.ConnectionPasserBase:
CityBuilderCore.IConnectionPasser CityBuilderCore.ConnectionPasserStructure CityBuilderCore.ConnectionPasserTiles CityBuilderCore.ConnectionFeederStructure CityBuilderCore.ConnectionFeederTiles

Public Member Functions

IEnumerable< Vector2Int > GetPoints ()
 the points of the passer
 
void ValueChanged (Vector2Int point, int value)
 this is where the passer gets notified about changes to the values of its points
 

Public Attributes

Connection Connection
 
PointValueEvent PointValueChanged
 

Protected Member Functions

virtual void Start ()
 
virtual void OnDestroy ()
 
void onPointsChanged (IEnumerable< Vector2Int > removed, IEnumerable< Vector2Int > added)
 

Events

Action< PointsChanged< IConnectionPasser > > PointsChanged
 
- Events inherited from CityBuilderCore.IConnectionPasser
Action< PointsChanged< IConnectionPasser > > PointsChanged
 fired by the passer when points are removed or added to it
 

Additional Inherited Members

- Properties inherited from CityBuilderCore.IConnectionPasser

Member Function Documentation

◆ GetPoints()

IEnumerable< Vector2Int > CityBuilderCore.ConnectionPasserBase.GetPoints ( )
abstract

the points of the passer

Returns

Implements CityBuilderCore.IConnectionPasser.

◆ ValueChanged()

void CityBuilderCore.ConnectionPasserBase.ValueChanged ( Vector2Int point,
int value )
inline

this is where the passer gets notified about changes to the values of its points

Parameters
pointthe point at which the value changed
valuethe new value at the point

Implements CityBuilderCore.IConnectionPasser.