|
inkcpp
|
Base class for all ink threads. More...
#include <InkThread.h>
Public Member Functions | |
| void | Yield () |
| Yields the thread immediately. | |
| bool | IsYielding () |
| Checks if the thread is stopped. | |
| void | Resume () |
| Resumes yielded thread. | |
| void | Stop () |
| Kills thread at next possible moment. | |
| AInkRuntime * | GetRuntime () const |
| Access runtime the thread belongs to. | |
| void | OnStartup () |
| triggered after initializing the runner | |
| void | OnLineWritten (const FString &line, const UTagList *tags) |
| triggered if a new line of context is available | |
| void | OnKnotEntered (const UTagList *global_tags, const UTagList *knot_tags) |
| triggered if a knew knot/stitch is entered (tunneling is ignored). | |
| void | OnTag (const FString &tag_name) |
| triggered when a tag is encountered | |
| void | OnChoice (const TArray< UInkChoice * > &choices) |
| triggered when reached a choice point. | |
| void | OnShutdown () |
| triggered when the thread reached the end of context | |
| bool | PickChoice (int index) |
| picks a choice to continue with | |
| void | RegisterTagFunction (FName functionName, const FTagFunctionDelegate &function) |
| Register a callback for a named "tag function". | |
| void | RegisterExternalFunction (const FString &functionName, const FExternalFunctionDelegate &function, bool lookaheadSafe=false) |
| register a external function. | |
| void | RegisterExternalEvent (const FString &functionName, const FExternalFunctionVoidDelegate &function, bool lookaheadSafe=false) |
| register external event. | |
| const UTagList * | GetKnotTags () |
| get knots assoziated with current knot. | |
| const UTagList * | GetGlobalTags () |
| get global tags. | |
Friends | |
| class | AInkRuntime |
Base class for all ink threads.
| const UTagList * UInkThread::GetGlobalTags | ( | ) |
get global tags.
global tags are tags listed at the top of the file before the first line of content
| const UTagList * UInkThread::GetKnotTags | ( | ) |
get knots assoziated with current knot.
knot tags are tags listed behind a knot == knot name == before the first line of content
|
inline |
Access runtime the thread belongs to.
| bool UInkThread::IsYielding | ( | ) |
| void UInkThread::OnChoice | ( | const TArray< UInkChoice * > & | choices | ) |
triggered when reached a choice point.
| choices | possible branches to choose from, in order to continue |
triggered if a knew knot/stitch is entered (tunneling is ignored).
Triggers before the first line of a knot/stitch is written
| global_tags | tags assoziated with global file |
| knot_tags | tags assoziated with the current knot/stitch |
| void UInkThread::OnLineWritten | ( | const FString & | line, |
| const UTagList * | tags ) |
triggered if a new line of context is available
| line | text of new line |
| tags | tags associated with this line |
| void UInkThread::OnShutdown | ( | ) |
| void UInkThread::OnStartup | ( | ) |
triggered after initializing the runner
| void UInkThread::OnTag | ( | const FString & | tag_name | ) |
triggered when a tag is encountered
| tag_name | the tag found |
| bool UInkThread::PickChoice | ( | int | index | ) |
picks a choice to continue with
| false | if the index is out of range |
| void UInkThread::RegisterExternalEvent | ( | const FString & | functionName, |
| const FExternalFunctionVoidDelegate & | function, | ||
| bool | lookaheadSafe = false ) |
register external event.
A event has the return type void.
| void UInkThread::RegisterExternalFunction | ( | const FString & | functionName, |
| const FExternalFunctionDelegate & | function, | ||
| bool | lookaheadSafe = false ) |
register a external function.
A function provides a return value
| void UInkThread::RegisterTagFunction | ( | FName | functionName, |
| const FTagFunctionDelegate & | function ) |
| void UInkThread::Resume | ( | ) |
| void UInkThread::Stop | ( | ) |
Kills thread at next possible moment.
| void UInkThread::Yield | ( | ) |