Loading...
Searching...
No Matches
CityBuilderCore.DefaultScoresCalculator Class Reference

Detailed Description

default calculator for scores which calculates and buffers all scores from ObjectRepository.Scores
starts calculations in a checker and spreads them out over multiple frames

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

Inheritance diagram for CityBuilderCore.DefaultScoresCalculator:
CityBuilderCore.IScoresCalculator

Public Member Functions

int GetValue (Score score)
 gets the last calculated value for the score
 
void Register (IScoreModifier modifier)
 adds a modifier that will be applied to score values after calculating them
 
void Deregister (IScoreModifier modifier)
 removes a modifier that has previously been registered
 

Protected Member Functions

virtual void Awake ()
 
virtual void Start ()
 

Events

Action Calculated
 
- Events inherited from CityBuilderCore.IScoresCalculator
Action Calculated
 fires after every round of score calculations
can be used to refresh score visualizations
 

Member Function Documentation

◆ Deregister()

void CityBuilderCore.DefaultScoresCalculator.Deregister ( IScoreModifier modifier)

removes a modifier that has previously been registered

Parameters
modifierthe modifier that will no longer be applied, the change will not happen until the next round of calculations

Implements CityBuilderCore.IScoresCalculator.

◆ GetValue()

int CityBuilderCore.DefaultScoresCalculator.GetValue ( Score score)

gets the last calculated value for the score

Parameters
scorethe score for which to retrieve tha value
Returns
the last value calculated

Implements CityBuilderCore.IScoresCalculator.

◆ Register()

void CityBuilderCore.DefaultScoresCalculator.Register ( IScoreModifier modifier)

adds a modifier that will be applied to score values after calculating them

Parameters
modifierthe modifier that will be applied next time score calculation happens

Implements CityBuilderCore.IScoresCalculator.