ClassicCityBuilderKit 1.8.8
|
handles layer values, may have some built in way to establish base values
ILayerAffector that only affect some points and ILayerModifier that affect a layer globally are registered with it
combining base values, affectors and modifiers it can provide the layer value for every point on the map
the value can be manually requested or automatically delivered when structures or building parts are marked as ILayerDependency
Public Member Functions | |
void | Register (ILayerAffector affector) |
void | Deregister (ILayerAffector affector) |
void | Register (ILayerModifier modifier) |
void | Deregister (ILayerModifier modifier) |
bool | CheckRequirement (Vector2Int origin, Vector2Int size, LayerRequirement requirement) |
checks if the points in the specified box, overall, satisfy the requirements | |
IEnumerable< ILayerDependency > | GetDependencies () |
returns all layer dependencies dependencies might be evolutions, roads, ... | |
IEnumerable< ILayerDependency > | GetDependencies (Vector2Int position) |
returns a layer dependency if one exists at that point dependencies might be evolutions, roads, ... | |
LayerKey | GetKey (Layer layer, Vector2Int position) |
returns an explanation of the layer value at a certain point(basevalue+affectors) | |
int | GetValue (Vector2Int position, Layer layer) |
returns the computed total value of a layer at a point | |
IEnumerable< Tuple< Vector2Int, int > > | GetValues (Layer layer) |
returns all positions and values of a layer where the value differs from 0 | |
Events | |
Action< Layer > | Changed |
fired whenever an affector is added or removed | |
bool CityBuilderCore.ILayerManager.CheckRequirement | ( | Vector2Int | origin, |
Vector2Int | size, | ||
LayerRequirement | requirement ) |
checks if the points in the specified box, overall, satisfy the requirements
origin | |
size | |
requirement |
Implemented in CityBuilderCore.DefaultLayerManager.
IEnumerable< ILayerDependency > CityBuilderCore.ILayerManager.GetDependencies | ( | ) |
returns all layer dependencies
dependencies might be evolutions, roads, ...
position |
Implemented in CityBuilderCore.DefaultLayerManager.
IEnumerable< ILayerDependency > CityBuilderCore.ILayerManager.GetDependencies | ( | Vector2Int | position | ) |
returns a layer dependency if one exists at that point
dependencies might be evolutions, roads, ...
position |
Implemented in CityBuilderCore.DefaultLayerManager.
returns an explanation of the layer value at a certain point(basevalue+affectors)
layer | |
position |
Implemented in CityBuilderCore.DefaultLayerManager.
int CityBuilderCore.ILayerManager.GetValue | ( | Vector2Int | position, |
Layer | layer ) |
returns the computed total value of a layer at a point
position | |
layer |
Implemented in CityBuilderCore.DefaultLayerManager.
IEnumerable< Tuple< Vector2Int, int > > CityBuilderCore.ILayerManager.GetValues | ( | Layer | layer | ) |
returns all positions and values of a layer where the value differs from 0
layer |
Implemented in CityBuilderCore.DefaultLayerManager.