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

Detailed Description

default implementation for various meta game functionality(missions, saving, settings, ...)

https://citybuilder.softleitner.com/manual

Inheritance diagram for CityBuilderCore.DefaultGameManager:
CityBuilderCore.IMissionManager CityBuilderCore.IGameSpeed CityBuilderCore.IGameSettings CityBuilderCore.IGameSaver CityBuilderCore.IDifficultyFactor

Classes

class  ExtraSaveData
 
class  SaveData
 
class  SaveDataMeta
 

Public Member Functions

void SetMissionParameters (MissionParameters missionParameters)
 sets mission, difficulty, new/continue
triggers mission initialization like loading for continue
 
void Restart ()
 
void Pause ()
 pauses game, continue with Resume
 
void Resume ()
 resumes game after pause has been called
 
void SetSpeed (float speed)
 set the current gamespeed
 
void RegisterDifficultyFactor (IDifficultyFactor difficultyFactor)
 register something influencing difficulty(for example increase risks faster during times of peril)
 
void DeregisterDifficultyFactor (IDifficultyFactor difficultyFactor)
 deregister something influencing difficulty
 
void Save ()
 saves to the quick slot
 
void SaveNamed (string name)
 saves the game under a specified name
 
void Load ()
 loads from the quick slot
 
void LoadNamed (string name)
 loads from a specified name
 

Public Attributes

bool DisableEfficiency = false
 
bool DisableEmployment = false
 
float CheckInterval = 1f
 
float Speed = 1f
 
bool IsPaused = false
 
MissionParameters DebugMission
 
float RiskMultiplier = 1f
 
float ServiceMultiplier = 1f
 
float ItemsMultiplier = 1f
 
bool SaveMetaData
 
Fader Fader
 
BoolEvent IsSavingChanged
 fired true at the start of saving and false at the end, might be used to display save messages
 
BoolEvent IsLoadingChanged
 fired true at the start of loading and false at the end, might be used to display loading messages
 
UnityEvent Started
 fired when a mission is started for the first time, might be used to display a mission briefing
 
UnityEvent Finished
 fired when the missions win conditions are satisfied for the first time, might be used to display a win screen
 
TimingHappeningStateEvent HappeningStateChanged
 fired when a happening starts or ends
 

Protected Member Functions

virtual void Awake ()
 
virtual void Start ()
 
virtual void Update ()
 

Properties

bool IsSaving [get]
 check if the game is currently saving
 
bool IsLoading [get]
 check if the game is currently loading, used to suppress certain checks and initializations during loading
 
bool IsFinished [get]
 whether the mission has been finished in this playthrough
if the mission has been finished ever can be checked in Mission.GetFinished(Difficulty)
 
float Playtime [get]
 time passed since start of the mission, carries over saves
 
MissionParameters MissionParameters [get]
 gets mission, difficulty, new/continue of the active mission
 
- Properties inherited from CityBuilderCore.IMissionManager
- Properties inherited from CityBuilderCore.IGameSpeed
- Properties inherited from CityBuilderCore.IGameSettings
- Properties inherited from CityBuilderCore.IGameSaver
- Properties inherited from CityBuilderCore.IDifficultyFactor

Member Function Documentation

◆ DeregisterDifficultyFactor()

void CityBuilderCore.DefaultGameManager.DeregisterDifficultyFactor ( IDifficultyFactor difficultyFactor)

deregister something influencing difficulty

Parameters
difficultyFactor

Implements CityBuilderCore.IGameSettings.

◆ Load()

void CityBuilderCore.DefaultGameManager.Load ( )
inline

loads from the quick slot

Implements CityBuilderCore.IGameSaver.

◆ LoadNamed()

void CityBuilderCore.DefaultGameManager.LoadNamed ( string name)
inline

loads from a specified name

Parameters
namename that has been previously saved to

Implements CityBuilderCore.IGameSaver.

◆ Pause()

void CityBuilderCore.DefaultGameManager.Pause ( )

pauses game, continue with Resume

Implements CityBuilderCore.IGameSpeed.

◆ RegisterDifficultyFactor()

void CityBuilderCore.DefaultGameManager.RegisterDifficultyFactor ( IDifficultyFactor difficultyFactor)

register something influencing difficulty(for example increase risks faster during times of peril)

Parameters
difficultyFactor

Implements CityBuilderCore.IGameSettings.

◆ Resume()

void CityBuilderCore.DefaultGameManager.Resume ( )

resumes game after pause has been called

Implements CityBuilderCore.IGameSpeed.

◆ Save()

void CityBuilderCore.DefaultGameManager.Save ( )
inline

saves to the quick slot

Implements CityBuilderCore.IGameSaver.

◆ SaveNamed()

void CityBuilderCore.DefaultGameManager.SaveNamed ( string name)
inline

saves the game under a specified name

Parameters
namethe name for the save that can later be used when loading

Implements CityBuilderCore.IGameSaver.

◆ SetMissionParameters()

void CityBuilderCore.DefaultGameManager.SetMissionParameters ( MissionParameters missionParameters)
inline

sets mission, difficulty, new/continue
triggers mission initialization like loading for continue

Parameters
missionParameters

Implements CityBuilderCore.IMissionManager.

◆ SetSpeed()

void CityBuilderCore.DefaultGameManager.SetSpeed ( float speed)
inline

set the current gamespeed

Parameters
speed

Implements CityBuilderCore.IGameSpeed.

Property Documentation

◆ IsFinished

bool CityBuilderCore.DefaultGameManager.IsFinished
get

whether the mission has been finished in this playthrough
if the mission has been finished ever can be checked in Mission.GetFinished(Difficulty)

Implements CityBuilderCore.IMissionManager.

◆ IsLoading

bool CityBuilderCore.DefaultGameManager.IsLoading
get

check if the game is currently loading, used to suppress certain checks and initializations during loading

Implements CityBuilderCore.IGameSaver.

◆ IsSaving

bool CityBuilderCore.DefaultGameManager.IsSaving
get

check if the game is currently saving

Implements CityBuilderCore.IGameSaver.

◆ MissionParameters

MissionParameters CityBuilderCore.DefaultGameManager.MissionParameters
get

gets mission, difficulty, new/continue of the active mission

Implements CityBuilderCore.IMissionManager.

◆ Playtime

float CityBuilderCore.DefaultGameManager.Playtime
get

time passed since start of the mission, carries over saves

Implements CityBuilderCore.IGameSpeed.