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

Detailed Description

used to modify and persist terrain data

https://citybuilder.softleitner.com/manual

Inheritance diagram for CityBuilderCore.TerrainModifier:
CityBuilderCore.ExtraDataBehaviour CityBuilderCore.KeyedBehaviour CityBuilderCore.ISaveData CityBuilderCore.IKeyed

Classes

class  TerrainModifierData
 
struct  TerrainModifierTree
 

Public Member Functions

void Initialize ()
 
IEnumerable< Vector2Int > GetTreePoints (int index=-1)
 
void RemoveTrees (Vector2Int point, int index=-1)
 
void AddTree (Vector2Int point, int index=0, float height=1f, float width=1f, float color=1f)
 
void RemoveDetails (Vector2Int point, int index=-1)
 
override string SaveData ()
 serializes the objects state(usually to json) and returns it
 
override void LoadData (string json)
 deserializes the serialized json data and loads the data as its new state
 
- Public Member Functions inherited from CityBuilderCore.ExtraDataBehaviour
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
 

Public Attributes

bool Heights = true
 
bool Alphas = true
 
bool Trees = true
 
bool Details = true
 
UnityEvent Loaded
 
- Public Attributes inherited from CityBuilderCore.KeyedBehaviour
string Key
 

Additional Inherited Members

- Properties inherited from CityBuilderCore.IKeyed

Member Function Documentation

◆ LoadData()

override void CityBuilderCore.TerrainModifier.LoadData ( string json)
inline

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

Parameters
json

Implements CityBuilderCore.ISaveData.

◆ SaveData()

override string CityBuilderCore.TerrainModifier.SaveData ( )
inline

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

Returns
serialized save data

Implements CityBuilderCore.ISaveData.