Loading...
Searching...
No Matches
CityBuilderCore.IBuildingValue Interface Reference

Detailed Description

any kind of value a building might have(risks, services, items, ...)

Inheritance diagram for CityBuilderCore.IBuildingValue:
CityBuilderCore.Item CityBuilderCore.ItemCategory CityBuilderCore.ItemSet CityBuilderCore.Layer CityBuilderCore.Risk CityBuilderCore.RiskCategory CityBuilderCore.Service CityBuilderCore.ServiceCategory CityBuilderCore.ViewBuildingHealthBar

Public Member Functions

bool HasValue (IBuilding building)
 whether the value even applies to the building in question
 
float GetMaximum (IBuilding building)
 the maximum value this value may get to
important for bars that use a ratio
 
float GetValue (IBuilding building)
 checks for the value the building currently has
 
Vector3 GetPosition (IBuilding building)
 the world position that the value should be visualized at
especially relevant for global values that are not created as a child of the building
 

Member Function Documentation

◆ GetMaximum()

float CityBuilderCore.IBuildingValue.GetMaximum ( IBuilding building)

the maximum value this value may get to
important for bars that use a ratio

Parameters
buildingthe building in question
Returns
max value the building might ever return

Implemented in CityBuilderCore.Item, CityBuilderCore.ItemCategory, CityBuilderCore.ItemSet, CityBuilderCore.Layer, CityBuilderCore.Risk, CityBuilderCore.RiskCategory, CityBuilderCore.Service, CityBuilderCore.ServiceCategory, and CityBuilderCore.ViewBuildingHealthBar.

◆ GetPosition()

Vector3 CityBuilderCore.IBuildingValue.GetPosition ( IBuilding building)

the world position that the value should be visualized at
especially relevant for global values that are not created as a child of the building

Parameters
buildingthe building in question
Returns
where the value should be visualized

Implemented in CityBuilderCore.Item, CityBuilderCore.ItemCategory, CityBuilderCore.ItemSet, CityBuilderCore.Layer, CityBuilderCore.Risk, CityBuilderCore.RiskCategory, CityBuilderCore.Service, CityBuilderCore.ServiceCategory, and CityBuilderCore.ViewBuildingHealthBar.

◆ GetValue()

float CityBuilderCore.IBuildingValue.GetValue ( IBuilding building)

checks for the value the building currently has

Parameters
buildingthe building of which we want to know the value
Returns
the value of the building

Implemented in CityBuilderCore.Item, CityBuilderCore.ItemCategory, CityBuilderCore.ItemSet, CityBuilderCore.Layer, CityBuilderCore.Risk, CityBuilderCore.RiskCategory, CityBuilderCore.Service, CityBuilderCore.ServiceCategory, and CityBuilderCore.ViewBuildingHealthBar.

◆ HasValue()

bool CityBuilderCore.IBuildingValue.HasValue ( IBuilding building)

whether the value even applies to the building in question

Parameters
buildingthe building in question
Returns
true when the building has this value

Implemented in CityBuilderCore.Item, CityBuilderCore.ItemCategory, CityBuilderCore.ItemSet, CityBuilderCore.Layer, CityBuilderCore.Risk, CityBuilderCore.RiskCategory, CityBuilderCore.Service, CityBuilderCore.ServiceCategory, and CityBuilderCore.ViewBuildingHealthBar.