Loading...
Searching...
No Matches
CityBuilderTown.TownFieldTask Class Reference

Detailed Description

in spring the field can be tilled which makes a walker go to its point and work for a set time
if the tilling was completed in spring the field will grow during summer when autumn comes and the field has grown fully it can be harvested by a walker which places an item and resets the field

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

Inheritance diagram for CityBuilderTown.TownFieldTask:
CityBuilderTown.TownTask CityBuilderCore.KeyedBehaviour CityBuilderCore.IKeyed

Classes

class  TownFieldData
 

Public Types

enum  FieldState { None = 0 , Till = 10 , Grow = 20 , Harvest = 30 }
 

Public Member Functions

override bool CanStartTask (TownWalker walker)
 
override WalkerAction[] StartTask (TownWalker walker)
 
override void ContinueTask (TownWalker walker)
 
override void FinishTask (TownWalker walker, ProcessState process)
 
override bool ProgressTask (TownWalker walker, string key)
 
override string GetDescription ()
 
override string GetDebugText ()
 
- Public Member Functions inherited from CityBuilderTown.TownTask
WalkerAction[] StartTask (TownWalker walker)
 
void ContinueTask (TownWalker walker)
 
void FinishTask (TownWalker walker, ProcessState process)
 
virtual void Terminate ()
 
virtual void SignalTask (TownWalker walker, string key)
 
virtual void SuspendTask ()
 
virtual void ResumeTask ()
 
virtual void OnMessages (string e)
 use when a single string has to be split into several messages
by default the parameter is split by spaces
 
virtual void OnMessage (string e)
 puts a message into the characters messaging pipeline
 
TownTaskData SaveData ()
 
void LoadData (TownTaskData data)
 

Public Attributes

float TillTime
 
float GrowTime
 
float HarvestTime
 
TownItemTask ItemTask
 
Transform Tilled
 
Transform[] Plants
 
- Public Attributes inherited from CityBuilderTown.TownTask
TownJob Job
 
Sprite Icon
 
Transform Visual
 
GameObject Tool
 
UnityEvent< string > MessageReceived
 
MessageEvent[] MessageEvents
 
- Public Attributes inherited from CityBuilderCore.KeyedBehaviour
string Key
 

Protected Member Functions

override void Update ()
 
override string saveExtras ()
 
override void loadExtras (string json)
 
- Protected Member Functions inherited from CityBuilderTown.TownTask
virtual void Awake ()
 
virtual void OnDestroy ()
 

Properties

override IEnumerable< TownWalkerWalkers [get]
 
- Properties inherited from CityBuilderTown.TownTask
Guid Id = Guid.NewGuid() [get]
 
virtual IEnumerable< TownWalkerWalkers [get]
 
Vector2Int Point [get]
 
- Properties inherited from CityBuilderCore.IKeyed

Additional Inherited Members

- Protected Attributes inherited from CityBuilderTown.TownTask
bool _isTerminated
 
bool _isSuspended
 

Member Function Documentation

◆ CanStartTask()

override bool CityBuilderTown.TownFieldTask.CanStartTask ( TownWalker walker)
inlinevirtual

Reimplemented from CityBuilderTown.TownTask.

◆ GetDebugText()

override string CityBuilderTown.TownFieldTask.GetDebugText ( )
inlinevirtual

Reimplemented from CityBuilderTown.TownTask.

◆ GetDescription()

override string CityBuilderTown.TownFieldTask.GetDescription ( )
inlinevirtual

Reimplemented from CityBuilderTown.TownTask.

◆ loadExtras()

override void CityBuilderTown.TownFieldTask.loadExtras ( string json)
inlineprotectedvirtual

Reimplemented from CityBuilderTown.TownTask.

◆ ProgressTask()

override bool CityBuilderTown.TownFieldTask.ProgressTask ( TownWalker walker,
string key )
inlinevirtual

Reimplemented from CityBuilderTown.TownTask.

◆ saveExtras()

override string CityBuilderTown.TownFieldTask.saveExtras ( )
inlineprotectedvirtual

Reimplemented from CityBuilderTown.TownTask.

◆ Update()

override void CityBuilderTown.TownFieldTask.Update ( )
inlineprotectedvirtual

Reimplemented from CityBuilderTown.TownTask.