ClassicCityBuilderKit 1.8.8
|
helper class for Walker that holds the current status of a running process
a process is a series of WalkerActions that is usually started from within the walker
ProcessState takes care of tracking the currently active action as well as advancing to the next one or canceling the process
Walker.StartProcess(WalkerAction[], string) starts a new process, when a walker is loaded use Walker.continueProcess
a process can be canceled by Walker.CancelProcess which may not end the process immediately but rather when the walker is in an ok state next
Classes | |
class | ProcessData |
Public Member Functions | |
ProcessState (string key, WalkerAction[] actions) | |
void | Start (Walker walker) |
starts the process and, in extension, the first action in it | |
bool | Advance (Walker walker) |
moves the process to the next action or finishes it when the last one has been finished | |
void | Continue (Walker walker) |
called when a game is loaded so the process can continue where it left off | |
void | Cancel (Walker walker) |
requests for the process to be canceled, the process may not finish immediately but rather when it next is in a good state | |
ProcessData | GetData () |
Static Public Member Functions | |
static ProcessState | FromData (ProcessData data) |
Properties | |
string | Key [get] |
identifier that can be used to check what the walker is currently doing | |
WalkerAction[] | Actions [get] |
actions that are executed in order | |
int | CurrentIndex [get] |
index of the currently active action | |
bool | IsCanceled [get] |
whether the process has been canceled, useful to check if a task has actually been performed or just distruped by something else | |
WalkerAction | CurrentAction [get] |
currently active action | |
|
inline |
moves the process to the next action or finishes it when the last one has been finished
walker | the walker the process is performed on |
|
inline |
requests for the process to be canceled, the process may not finish immediately but rather when it next is in a good state
walker | the walker the process is performed on |
|
inline |
called when a game is loaded so the process can continue where it left off
walker | the walker the process is performed on |
|
inline |
starts the process and, in extension, the first action in it
walker | the walker the process is performed on |