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

Detailed Description

sequence of building evolution stages including descriptions and the logic to determine the current stage

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

Inheritance diagram for CityBuilderCore.EvolutionSequence:

Public Member Functions

EvolutionStage GetStage (Vector2Int position, Service[] services, Item[] items)
 determines which stage the building should be at
 
bool GetDirection (BuildingInfo current, BuildingInfo evolution)
 checks if the target evolution is above the current one
 
string GetDescription (BuildingInfo current, BuildingInfo evolution, Vector2Int position, IEnumerable< Service > services, IEnumerable< Item > items)
 determines whet the building is missing before it can evolve to another stage
 

Public Attributes

EvolutionStage[] Stages
 
string EvolvedDescription
 
string EvolutionDescription
 
string Description
 
string DevolutionDescription
 

Member Function Documentation

◆ GetDescription()

string CityBuilderCore.EvolutionSequence.GetDescription ( BuildingInfo current,
BuildingInfo evolution,
Vector2Int position,
IEnumerable< Service > services,
IEnumerable< Item > items )
inline

determines whet the building is missing before it can evolve to another stage

Parameters
currentthe buildings current info
evolutionthe evolution toi check against, probably the next higher one
positionposition used to determine layer values
servicesservice currently available to the building
itemsitems currently available to the building
Returns
a string that expresses the missing requirements before the building can evolve to the desired stage

◆ GetDirection()

bool CityBuilderCore.EvolutionSequence.GetDirection ( BuildingInfo current,
BuildingInfo evolution )
inline

checks if the target evolution is above the current one

Parameters
currentthe current building
evolutionthe stage it should change to
Returns
true when the building should evolve

◆ GetStage()

EvolutionStage CityBuilderCore.EvolutionSequence.GetStage ( Vector2Int position,
Service[] services,
Item[] items )
inline

determines which stage the building should be at

Parameters
positionposition used to calculate layer values
servicesservices the building currently has available
itemsitems the building currently has access to
Returns
the target stage