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 | 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. | |
Friends | |
class | AInkRuntime |
Base class for all ink threads.
|
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 |
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 | ( | ) |