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

Detailed Description

after a walker goes to the task point and spend some time working the task is finished and the walker receives some items
the point is also removed from a source structure and may be added to a destination structure
for example when gathering berries the point is removed from the berries structure and added to berries empty

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

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

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 Duration
 
ItemQuantity Items
 
string SourceStructure
 
string DestinationStructure
 
- 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 string saveExtras ()
 
override void loadExtras (string json)
 
- Protected Member Functions inherited from CityBuilderTown.TownTask
virtual void Awake ()
 
virtual void Update ()
 
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.TownGatherTask.CanStartTask ( TownWalker walker)
inlinevirtual

Reimplemented from CityBuilderTown.TownTask.

◆ GetDebugText()

override string CityBuilderTown.TownGatherTask.GetDebugText ( )
inlinevirtual

Reimplemented from CityBuilderTown.TownTask.

◆ GetDescription()

override string CityBuilderTown.TownGatherTask.GetDescription ( )
virtual

Reimplemented from CityBuilderTown.TownTask.

◆ loadExtras()

override void CityBuilderTown.TownGatherTask.loadExtras ( string json)
protectedvirtual

Reimplemented from CityBuilderTown.TownTask.

◆ ProgressTask()

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

Reimplemented from CityBuilderTown.TownTask.

◆ saveExtras()

override string CityBuilderTown.TownGatherTask.saveExtras ( )
protectedvirtual

Reimplemented from CityBuilderTown.TownTask.