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

Detailed Description

central repository that calculates and buffers score values
this is expecially important for performance heavy scores that should not be calculated multiple times every frame

Inheritance diagram for CityBuilderCore.IScoresCalculator:
CityBuilderCore.DefaultScoresCalculator

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
 

Events

Action Calculated
 fires after every round of score calculations
can be used to refresh score visualizations
 

Member Function Documentation

◆ Deregister()

void CityBuilderCore.IScoresCalculator.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

Implemented in CityBuilderCore.DefaultScoresCalculator.

◆ GetValue()

int CityBuilderCore.IScoresCalculator.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

Implemented in CityBuilderCore.DefaultScoresCalculator.

◆ Register()

void CityBuilderCore.IScoresCalculator.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

Implemented in CityBuilderCore.DefaultScoresCalculator.