inkcpp
|
Instanciated story with global variable storage and access, used to instanciate new threads. More...
#include <InkRuntime.h>
Public Member Functions | |
UInkThread * | Start (TSubclassOf< UInkThread > type, FString path="", bool runImmediately=true) |
Create a new Thread. | |
UInkThread * | StartExisting (UInkThread *thread, FString path="", bool runImmediately=true) |
Create a new Thread in existing memory, for more details. | |
FInkSnapshot | Snapshot () |
creates a snapshot of the current runtime state. | |
void | LoadSnapshot (const FInkSnapshot &snapshot) |
Loads a snapshot file, therfore deletes globals and invalidate all current Threads After this Start and StartExisting will load the corresponding Threads (on at a time) | |
void | PushExclusiveThread (UInkThread *Thread) |
Marks a thread as "exclusive". | |
void | PopExclusiveThread (UInkThread *Thread) |
Removes a thread from the exclusive stack. | |
void | RegisterTagFunction (FName functionName, const FTagFunctionDelegate &function) |
register a "tag function" This function is executed if context or a tag in a special format apears | |
FInkVar | GetGlobalVariable (const FString &name) |
Access a variable from the ink runtime. | |
void | SetGlobalVariable (const FString &name, const FInkVar &value) |
Sets a global variable inside the ink runtime. | |
void | ObserverVariable (const FString &variableName, const FVariableCallbackDelegate &callback) |
Gets a ping if variable changes. | |
void | ObserverVariableEvent (const FString &variableName, const FVariableCallbackDelegateNewValue &callback) |
On variable change provides new value. | |
void | ObserverVariableChange (const FString &variableName, const FVariableCallbackDelegateNewOldValue &callback) |
On variable change provides old and new value. | |
Protected Member Functions | |
virtual void | BeginPlay () override |
Called when the game starts or when spawned. | |
Instanciated story with global variable storage and access, used to instanciate new threads.
FInkVar AInkRuntime::GetGlobalVariable | ( | const FString & | name | ) |
Access a variable from the ink runtime.
variables are shared between all threads in the same runtime.
name | of variable in ink script |
void AInkRuntime::LoadSnapshot | ( | const FInkSnapshot & | snapshot | ) |
Loads a snapshot file, therfore deletes globals and invalidate all current Threads After this Start and StartExisting will load the corresponding Threads (on at a time)
void AInkRuntime::ObserverVariable | ( | const FString & | variableName, |
const FVariableCallbackDelegate & | callback ) |
Gets a ping if variable changes.
void AInkRuntime::ObserverVariableChange | ( | const FString & | variableName, |
const FVariableCallbackDelegateNewOldValue & | callback ) |
On variable change provides old and new value.
void AInkRuntime::ObserverVariableEvent | ( | const FString & | variableName, |
const FVariableCallbackDelegateNewValue & | callback ) |
On variable change provides new value.
void AInkRuntime::PopExclusiveThread | ( | UInkThread * | Thread | ) |
void AInkRuntime::PushExclusiveThread | ( | UInkThread * | Thread | ) |
Marks a thread as "exclusive".
As long as it is running, no other threads will update.
void AInkRuntime::RegisterTagFunction | ( | FName | functionName, |
const FTagFunctionDelegate & | function ) |
register a "tag function" This function is executed if context or a tag in a special format apears
void AInkRuntime::SetGlobalVariable | ( | const FString & | name, |
const FInkVar & | value ) |
Sets a global variable inside the ink runtime.
name | of variable in ink script |
value | new value for the variable |
FInkSnapshot AInkRuntime::Snapshot | ( | ) |
creates a snapshot of the current runtime state.
can be loladed with LoadSnapshot()
UInkThread * AInkRuntime::Start | ( | TSubclassOf< UInkThread > | type, |
FString | path = "", | ||
bool | runImmediately = true ) |
Create a new Thread.
If a Snapshot is set/loaded create Threads like there was before if you want to create a fresh Thread despite an existing LoadedSnapshot enter the starting path
UInkThread * AInkRuntime::StartExisting | ( | UInkThread * | thread, |
FString | path = "", | ||
bool | runImmediately = true ) |
Create a new Thread in existing memory, for more details.