central manager for the town demo
manages tasks, jobs, walkers, seasons
https://citybuilder.softleitner.com/manual/town
|
void | LoadingChanged (bool isLoading) |
|
int | GetItemLimit (Item item) |
|
void | SetItemLimit (Item item, int quantity) |
|
bool | GetItemLimitReached (Item item) |
|
void | RegisterTask (TownTask task) |
|
void | DeregisterTask (TownTask task) |
|
TownTask | CreateTask (TownTaskData taskData, Transform parent=null) |
|
T | CreateTask< T > (T prefab, Vector2Int point, Transform parent=null) |
|
TownTask | GetTask (Vector2Int point) |
|
TownTask | GetTask (Guid id) |
|
TownTask | GetTask (TownWalker townWalker) |
|
BuildingReference | GetHome (TownWalker _) |
|
void | SpawnWalker (IBuilding building) |
|
bool | CheckTask (Vector2Int point) |
|
bool | CheckHarvest (Vector2Int point) |
|
TownHarvestTask | CreateHarvest (Vector2Int point, Transform parent=null) |
|
TownClearTask | CreateClear (Vector2Int point, Transform parent=null) |
|
TownBuildTask | CreateBuild (Vector2Int point, Transform parent=null) |
|
TownDeliverTask | CreateDeliver (Vector2Int point, Transform parent=null) |
|
bool | Demolish (IEnumerable< Vector2Int > points) |
|
int | GetJobCount (TownJob job) |
|
void | SetJobCount (TownJob job, int count) |
|
void | Startup () |
|
void | StartupSet () |
|
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
|
|
|
static TownManager | Instance |
|
static int | WorkParameter = Animator.StringToHash("work") |
|
static int | ChopParameter = Animator.StringToHash("chop") |
|
|
float | FoodModifier [get] |
|
float | WarmModifier [get] |
|
float | ColdModifier [get] |
|
float | AgeModifier [get] |
|
float | GrowthModifier [get] |
|
TownSeason | Season [get] |
|
float | Coldness [get] |
|
◆ CreateTask< T >()
T CityBuilderTown.TownManager.CreateTask< T > |
( |
T | prefab, |
|
|
Vector2Int | point, |
|
|
Transform | parent = null ) |
|
inline |
◆ LoadData()
override void CityBuilderTown.TownManager.LoadData |
( |
string | json | ) |
|
|
inline |
◆ SaveData()
override string CityBuilderTown.TownManager.SaveData |
( |
| ) |
|
|
inline |
serializes the objects state(usually to json) and returns it
- Returns
- serialized save data
Implements CityBuilderCore.ISaveData.