|
ArticyXImporter
ArticyXImporter for Unreal Engine
|
#include <ArticyFlowPlayer.h>
Public Member Functions | |
| void | BeginPlay () override |
| void | EndPlay (const EEndPlayReason::Type EndPlayReason) override |
| template<typename Lambda> | |
| void | ShadowedOperation (Lambda Operation) const |
| uint32 | GetShadowLevel () const |
| UFUNCTION (BlueprintCallable, meta=(DisplayName="Set Start Node (ArticyRef)"), Category="Setup") void SetStartNode(FArticyRef NewId) | |
| UFUNCTION (BlueprintCallable, meta=(DisplayName="Set Start Node (ArticyID)"), Category="Setup") void SetStartNodeById(FArticyId NewId) | |
| UFUNCTION (BlueprintCallable, meta=(DisplayName="Set Start Node (FlowObject)"), Category="Setup") void SetStartNodeWithFlowObject(TScriptInterface< IArticyFlowObject > Node) | |
| FArticyRef | GetStartNode () |
| void | SetIgnoreInvalidBranches (bool bNewIgnoreInvalidBranches) |
| void | SetCursorTo (TScriptInterface< IArticyFlowObject > Node) |
| const TScriptInterface< IArticyFlowObject > | GetCursor () const |
| void | Play (int Index=0) |
| void | FinishCurrentPausedObject (int PinIndex=0) |
| void | PlayBranch (const FArticyBranch &Branch) |
| TArray< FArticyBranch > | Explore (IArticyFlowObject *Node, bool bShadowed, int32 Depth, bool IncludeCurrent=true) |
| void | SetPauseOn (EArticyPausableType Types) |
| bool | ShouldPauseOn (IArticyFlowObject *Node) const |
| bool | ShouldPauseOn (TScriptInterface< IArticyFlowObject > Node) const |
| UArticyGlobalVariables * | GetGVs () const |
| UObject * | GetMethodsProvider () |
| void | UpdateAvailableBranches () |
| const TArray< FArticyBranch > & | GetAvailableBranches () const |
| bool | IgnoresInvalidBranches () const |
| bool | OnTick (float DeltaTime) |
| DECLARE_DYNAMIC_MULTICAST_DELEGATE (FOnPushState) | |
| DECLARE_DYNAMIC_MULTICAST_DELEGATE (FOnPopState) | |
| DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam (FOnPlayerPaused, TScriptInterface< IArticyFlowObject >, PausedOn) | |
| DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam (FOnBranchesUpdated, const TArray< FArticyBranch > &, AvailableBranches) | |
Public Attributes | |
| uint8 | PauseOn |
| FOnPushState | OnShadowOpStart |
| FOnPopState | OnShadowOpEnd |
| FOnPlayerPaused | OnPlayerPaused |
| FOnBranchesUpdated | OnBranchesUpdated |
Protected Attributes | |
| int32 | ExploreLimit = 128 |
| uint8 | ShadowLevelLimit = 10 |
| bool | bIgnoreInvalidBranches = true |
| FArticyRef | StartOn |
| TArray< FArticyBranch > | AvailableBranches |
| TFunction< bool(const FArticyBranch &, const FArticyBranch &)> | SortBranches = ArticyBranchSorters::FArticyBranchPositionSorter() |
| UArticyAlternativeGlobalVariables * | OverrideGV = nullptr |
| UObject * | UserMethodsProvider |
This component handles traversal of the flow, starting and halting at specific nodes. The GlobalVariables instance and the UserMethodProvider used for this flow player instance can be specified.
|
override |
Called when the game starts or when spawned.
|
override |
Called when the game ends or actor destroyed
| TArray< FArticyBranch > UArticyFlowPlayer::Explore | ( | IArticyFlowObject * | Node, |
| bool | bShadowed, | ||
| int32 | Depth, | ||
| bool | IncludeCurrent = true ) |
Gather all branches that start from this node. The explore can be performed as shadowed operation. If the node is submergeable, a submerge is performed.
Explores the flow starting from a specified node.
| Node | The node to start exploring from. |
| bShadowed | Whether the exploration should be shadowed. |
| Depth | The current depth of exploration. |
| IncludeCurrent | Whether to include the current node in the exploration. |
| void UArticyFlowPlayer::FinishCurrentPausedObject | ( | int | PinIndex = 0 | ) |
Calls the script on an output pin of the current object
Finishes the current paused object by executing a specified pin.
| PinIndex | The index of the pin to execute. |
|
inline |
Get the currently available branches. This does not re-explore the branches.
|
inline |
Get the Cursor (current node).
| UArticyGlobalVariables * UArticyFlowPlayer::GetGVs | ( | ) | const |
Get the GV instance used for expresso script execution.
Retrieves the global variables used by this flow player.
| UObject * UArticyFlowPlayer::GetMethodsProvider | ( | ) |
Get the UserMethodsProvider used for resolving user defined methods.
Retrieves the user methods provider for this flow player.
|
inline |
Gets the last set StartOn node
|
inline |
Wether bIgnoreInvalidBranches is set.
| void UArticyFlowPlayer::Play | ( | int | BranchIndex = 0 | ) |
Play a branch, identified by its index in the AvailableBranches array.
Plays a specified branch by index.
| BranchIndex | The index of the branch to play. |
| void UArticyFlowPlayer::PlayBranch | ( | const FArticyBranch & | Branch | ) |
Traverse this branch to the end, executing all scripts and updating the Cursor to the branche's target.
Plays a specified branch, executing all nodes within it.
| Branch | The branch to play. |
| void UArticyFlowPlayer::SetCursorTo | ( | TScriptInterface< IArticyFlowObject > | Node | ) |
Set the Cursor (current node) to this Node and updates the available branches.
Sets the cursor to a specified node.
| Node | The flow object to which the cursor should be set. |
|
inline |
Gets the last set StartOn node
| void UArticyFlowPlayer::SetPauseOn | ( | EArticyPausableType | Types | ) |
Sets the nodes on which the flow player should pause.
| Types | The types of nodes to pause on. |
| void UArticyFlowPlayer::ShadowedOperation | ( | Lambda | Operation | ) | const |
Pushes a shadow state, executes the operation, then pops the shadow state back. The method is 'const' to eliminate side-effects (except for ShadowLevel).
Executes a lambda function within a shadowed operation.
| Lambda | The lambda function type. |
| Operation | The lambda function to execute. |
| bool UArticyFlowPlayer::ShouldPauseOn | ( | IArticyFlowObject * | Node | ) | const |
Returns true if Node is one of the PauseOn types.
Determines whether the flow player should pause on a specific node.
| Node | The node to check. |
| bool UArticyFlowPlayer::ShouldPauseOn | ( | TScriptInterface< IArticyFlowObject > | Node | ) | const |
Determines whether the flow player should pause on a specific node.
| Node | The node to check. |
| UArticyFlowPlayer::UFUNCTION | ( | BlueprintCallable | , |
| meta | = (DisplayName="Set Start Node (ArticyRef)"), | ||
| Category | = "Setup" ) |
Set the StartOn node to a certain node.
| UArticyFlowPlayer::UFUNCTION | ( | BlueprintCallable | , |
| meta | = (DisplayName="Set Start Node (FlowObject)"), | ||
| Category | = "Setup" ) |
Set the StartOn node to a certain node.
| void UArticyFlowPlayer::UpdateAvailableBranches | ( | ) |
Explore branches starting from the current StartOn node.
Updates the available branches from the current cursor position.
|
protected |
All the branches available at the current flow position.
|
protected |
Invalid branches will not be part of the AvailableBranches.
|
protected |
If this number of branches is reached, no more branches will be added. If a branch reaches this length, exploration on it is aborted.
| FOnBranchesUpdated UArticyFlowPlayer::OnBranchesUpdated |
This delegate is called when the AvailableBranches change.
| FOnPlayerPaused UArticyFlowPlayer::OnPlayerPaused |
This delegate is called when the flow player pauses on one of the object types set up in "PauseOn", or if the branch is done.
| FOnPopState UArticyFlowPlayer::OnShadowOpEnd |
This event is broadcast once the current ShadowedOperation ends.
| FOnPushState UArticyFlowPlayer::OnShadowOpStart |
This event is broadcast whenever a new ShadowedOperation starts.
|
protected |
The instance of the global variables to be used with this flow player instance. This property is private so it can only be directly changed through the editor, so we can ensure that the needed setup is triggered every time this changes.
Keep as nullptr if you want to use the default shared global variables.
| uint8 UArticyFlowPlayer::PauseOn |
|
protected |
If more than this amount of ShadowLevels are needed at the same time, branch exploration will abort.
|
protected |
The function to use to sort branches after determining the available branches. Defaults to sorting by position.
|
mutableprotected |
This object will be used to resolve user-defined ScriptMethods. It must implement the project-specific I<ProjectName>MethodsProvider interface (through blueprint or through inheritance). This property is private so it can only be directly changed through the editor, so we can ensure that the needed setup is triggered every time this changes.