layer manager iomplementation that can use a tilemap to define the base values
https://citybuilder.softleitner.com/manual/layers
|
IEnumerable< Tuple< Vector2Int, int > > | GetValues (Layer layer) |
| returns all positions and values of a layer where the value differs from 0
|
|
int | GetValue (Vector2Int position, Layer layer) |
| returns the computed total value of a layer at a point
|
|
LayerKey | GetKey (Layer layer, Vector2Int position) |
| returns an explanation of the layer value at a certain point(basevalue+affectors)
|
|
bool | CheckRequirement (Vector2Int origin, Vector2Int size, LayerRequirement requirement) |
| checks if the points in the specified box, overall, satisfy the requirements
|
|
void | Register (ILayerAffector affector) |
|
void | Deregister (ILayerAffector affector) |
|
void | Register (ILayerModifier modifier) |
|
void | Deregister (ILayerModifier modifier) |
|
virtual IEnumerable< ILayerDependency > | GetDependencies () |
| returns all layer dependencies
dependencies might be evolutions, roads, ...
|
|
virtual IEnumerable< ILayerDependency > | GetDependencies (Vector2Int point) |
| returns a layer dependency if one exists at that point
dependencies might be evolutions, roads, ...
|
|
|
virtual void | Awake () |
|
virtual void | Start () |
|
|
Action< Layer > | Changed |
|
Action< Layer > | Changed |
| fired whenever an affector is added or removed
|
|
◆ CheckRequirement()
bool CityBuilderCore.DefaultLayerManager.CheckRequirement |
( |
Vector2Int | origin, |
|
|
Vector2Int | size, |
|
|
LayerRequirement | requirement ) |
|
inline |
◆ Deregister() [1/2]
void CityBuilderCore.DefaultLayerManager.Deregister |
( |
ILayerAffector | affector | ) |
|
|
inline |
◆ Deregister() [2/2]
void CityBuilderCore.DefaultLayerManager.Deregister |
( |
ILayerModifier | modifier | ) |
|
|
inline |
◆ GetDependencies() [1/2]
virtual IEnumerable< ILayerDependency > CityBuilderCore.DefaultLayerManager.GetDependencies |
( |
| ) |
|
|
inlinevirtual |
◆ GetDependencies() [2/2]
virtual IEnumerable< ILayerDependency > CityBuilderCore.DefaultLayerManager.GetDependencies |
( |
Vector2Int | position | ) |
|
|
inlinevirtual |
returns a layer dependency if one exists at that point
dependencies might be evolutions, roads, ...
- Parameters
-
- Returns
Implements CityBuilderCore.ILayerManager.
◆ GetKey()
LayerKey CityBuilderCore.DefaultLayerManager.GetKey |
( |
Layer | layer, |
|
|
Vector2Int | position ) |
|
inline |
◆ GetValue()
int CityBuilderCore.DefaultLayerManager.GetValue |
( |
Vector2Int | position, |
|
|
Layer | layer ) |
|
inline |
◆ GetValues()
IEnumerable< Tuple< Vector2Int, int > > CityBuilderCore.DefaultLayerManager.GetValues |
( |
Layer | layer | ) |
|
|
inline |
◆ Register() [1/2]
void CityBuilderCore.DefaultLayerManager.Register |
( |
ILayerAffector | affector | ) |
|
|
inline |
◆ Register() [2/2]
void CityBuilderCore.DefaultLayerManager.Register |
( |
ILayerModifier | modifier | ) |
|
|
inline |