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

Detailed Description

base class for scores used for win conditions and statistics
a score is an asset that provides the method of calculating an int value
the value can be gotten directly using Calculate but it is recommended to use GetCalculatorValue
because the value is buffered there, just make sure there is a IScoresCalculator in the scene

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

Inheritance diagram for CityBuilderCore.Score:
CityBuilderCore.AverageBuildingScore CityBuilderCore.AverageLayerScore CityBuilderCore.AverageRiskScore CityBuilderCore.AverageScore CityBuilderCore.AverageServiceScore CityBuilderCore.BuildingItemScore CityBuilderCore.BuildingScore CityBuilderCore.CoverageScore CityBuilderCore.EmploymentScore CityBuilderCore.ItemScore CityBuilderCore.MultipliedScore CityBuilderCore.PopulationScore CityBuilderCore.SummedBuildingScore CityBuilderCore.SummedScore CityBuilderCore.ThresholdScore CityBuilderCore.WorkerScore CityBuilderManual.Custom.CustomScore

Public Member Functions

int Calculate ()
 freshly calculates the score value
consider using GetCalculatorValue instead to get a buffered value
 
int GetCalculatorValue ()
 gets the buffered score value from the IScoresCalculator
 

Public Attributes

string Name
 

Member Function Documentation

◆ Calculate()

int CityBuilderCore.Score.Calculate ( )
abstract

freshly calculates the score value
consider using GetCalculatorValue instead to get a buffered value

Returns
the current score value

◆ GetCalculatorValue()

int CityBuilderCore.Score.GetCalculatorValue ( )

gets the buffered score value from the IScoresCalculator

Returns
the last value calcualted for the score