ClassicCityBuilderKit 1.8.8
|
optional interface that adjusts the height of entities on the map
the DefaultMapHeight implementation does this by moving them up and down which makes sense for 3d games
2d games can ignore this entirely or perhaps add an implementation that scales entities a little bit
Public Member Functions | |
float | GetHeight (Vector3 position, PathType pathType=PathType.Map) |
calculates height at given world position | |
void | ApplyHeight (Transform transform, Vector3 position, PathType pathType=PathType.Map, float? overrideValue=null) |
applies heigth to the passed transform the transforms position may be used to calculate the height | |
void CityBuilderCore.IGridHeights.ApplyHeight | ( | Transform | transform, |
Vector3 | position, | ||
PathType | pathType = PathType.Map, | ||
float? | overrideValue = null ) |
applies heigth to the passed transform
the transforms position may be used to calculate the height
transform | the transform that will be changed |
pathType | height may be different when moving on a road for example |
overrideValue | regular height calculation may not always apply, for example on bridges(which use IOverrideHeight) |
Implemented in CityBuilderCore.DefaultMapHeight, and CityBuilderCore.LayerMapHeight.
float CityBuilderCore.IGridHeights.GetHeight | ( | Vector3 | position, |
PathType | pathType = PathType.Map ) |
calculates height at given world position
position | absolute world position |
pathType | height may be different when moving on a road for example |
Implemented in CityBuilderCore.DefaultMapHeight, and CityBuilderCore.LayerMapHeight.