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

Detailed Description

base class for behaviours that save data without being otherwise known to the rest of the system
DefaultGameManager finds all instances and saves them with the specified key

https://citybuilder.softleitner.com/manual

Inheritance diagram for CityBuilderCore.ExtraDataBehaviour:
CityBuilderCore.KeyedBehaviour CityBuilderCore.ISaveData CityBuilderCore.IKeyed CityBuilderCore.TaskList CityBuilderCore.TerrainModifier CityBuilderCore.TilemapSpawner CityBuilderTown.TownManager CityBuilderUrban.UrbanManager

Public Member Functions

void LoadData (string json)
 deserializes the serialized json data and loads the data as its new state
 
string SaveData ()
 serializes the objects state(usually to json) and returns it
 

Additional Inherited Members

- Public Attributes inherited from CityBuilderCore.KeyedBehaviour
string Key
 
- Properties inherited from CityBuilderCore.IKeyed

Member Function Documentation

◆ LoadData()

void CityBuilderCore.ExtraDataBehaviour.LoadData ( string json)
abstract

deserializes the serialized json data and loads the data as its new state

Parameters
json

Implements CityBuilderCore.ISaveData.

◆ SaveData()

string CityBuilderCore.ExtraDataBehaviour.SaveData ( )
abstract

serializes the objects state(usually to json) and returns it

Returns
serialized save data

Implements CityBuilderCore.ISaveData.