5#include "CoreMinimal.h"
6#include "Engine/DataAsset.h"
8#include "StoryManager.generated.h"
19 UPROPERTY(BlueprintReadWrite, EditAnywhere)
21 UPROPERTY(BlueprintReadWrite, EditAnywhere)
32 UPROPERTY(BlueprintReadWrite, EditAnywhere)
34 UPROPERTY(BlueprintReadWrite, EditAnywhere)
43 UPROPERTY(BlueprintReadWrite)
45 UPROPERTY(BlueprintReadWrite)
55 UPROPERTY(EditAnywhere)
56 TArray<FStepData> StepData;
82 UPROPERTY(EditAnywhere, BlueprintReadWrite)
84 UPROPERTY(BlueprintReadWrite)
87 UPROPERTY(BlueprintReadWrite, Replicated)
90 UPROPERTY(BlueprintReadWrite, Replicated)
92 UPROPERTY(BlueprintReadWrite, Replicated)
94 UPROPERTY(BlueprintReadWrite, Replicated)
96 UPROPERTY(BlueprintReadWrite, Replicated)
98 UPROPERTY(BlueprintReadWrite, Replicated)
101 UPROPERTY(BlueprintReadWrite, Replicated)
104 UPROPERTY(EditAnywhere, BlueprintReadWrite)
107 UPROPERTY(BlueprintReadOnly)
115 UFUNCTION(BlueprintCallable)
116 bool InitNewStory(
int newStoryIndex);
118 UFUNCTION(BlueprintCallable)
120 UFUNCTION(BlueprintCallable)
121 bool GoToNextSubStep();
122 UFUNCTION(BlueprintCallable)
123 void CompleteSubStep(
FStoryStep completedStep);
124 UFUNCTION(BlueprintCallable)
125 bool JumpToStepByIndex(
int index);
126 UFUNCTION(BlueprintCallable)
127 bool JumpToStepByName(
FText stepId);
129 UFUNCTION(BlueprintCallable)
130 void StepCompleted(
FText stepToUpdate,
bool goToNext = true);
135 UFUNCTION(BlueprintCallable)
136 static
void SetupNextStory(
int newNextStoryIndex, TArray<
FText> newStoryParameters);
138 UFUNCTION(BlueprintCallable)
139 static
int GetNextStoryIndex() {
return NextStoryIndex; }
141 UFUNCTION(BlueprintCallable)
142 static TArray<FText> GetStoryParameters() {
return StoryParameters; }
146 UPROPERTY(BlueprintAssignable, Category =
"Story Delegate")
147 FOnNewStep OnNewStep;
148 UPROPERTY(BlueprintAssignable, Category = "Story Delegate")
149 FOnNewSubStep OnNewSubStep;
150 UPROPERTY(BlueprintAssignable, Category = "Story Delegate")
151 FOnStepCompleted OnStepCompleted;
152 UPROPERTY(BlueprintAssignable, Category = "Story Delegate")
153 FOnRecordStepScore OnRecordStepScore;
154 UPROPERTY(BlueprintAssignable, Category = "Story Delegate")
155 FOnStoryLoaded OnStoryLoaded;
156 UPROPERTY(BlueprintAssignable, Category = "Story Delegate")
157 FOnEndOfStory OnEndOfStory;
158 UPROPERTY(BlueprintAssignable, Category = "Story Delegate")
159 FOnStepSkipped OnStepSkipped;
163 bool IsAllSubStepsCompleted();
170 void RecordStoryStepData();
172 UPROPERTY(BlueprintReadWrite, Replicated)
175 static
int NextStoryIndex;
176 static TArray<
FText> StoryParameters;
178 virtual
void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnApexWebSocketConnectFailed, const FString &, Error)
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnApexRequestComplete, EApexRequestType, RequestType, const class UVaRestRequestJSON *, Request)
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnApexWebSocketConnected)
#define DECLARE_EVENT_HANDLER(TEvent)
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnStoryLoaded)
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnNewStep, FStoryStep, newStep, bool, isForward)
DECLARE_LOG_CATEGORY_EXTERN(LogStoryManager, Log, All)
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnNewSubStep, FStoryStep, newSubStep)
It provides functionalities for handling events, sending events, and managing a private owner....
Event called when we on init experience.
A component responsible for managing the story progression in story actors.
TArray< FStepData > StepData
UPROPERTY(EditAnywhere)
Manager that provides handling story-related operations and data.
DECLARE_EVENT_HANDLER(UInitializationEvent)
static int GetNextStoryIndex()
UFUNCTION(BlueprintCallable)
FOnStepSkipped OnStepSkipped
UPROPERTY(BlueprintAssignable, Category = "Story Delegate")
TArray< UStoryComponent * > StoryComponents
UPROPERTY()
FOnNewStep OnNewStep
UPROPERTY(BlueprintAssignable, Category = "Story Delegate")
FStoryStep PreviousStep
UPROPERTY(BlueprintReadWrite, Replicated)
UStoryData * StoryData
UPROPERTY(BlueprintReadWrite, Replicated)
TArray< FPassedExperiences > PassedExperiencesArray
UPROPERTY(BlueprintReadWrite)
FStoryStep CurrentSubStep
UPROPERTY(BlueprintReadWrite, Replicated)
int StepIndex
UPROPERTY(BlueprintReadWrite, Replicated)
FOnStoryLoaded OnStoryLoaded
UPROPERTY(BlueprintAssignable, Category = "Story Delegate")
int SubStepIndex
UPROPERTY(BlueprintReadWrite, Replicated)
static TArray< FText > StoryParameters
bool BlockStory
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TArray< UStoryData * > StoryDataArray
UPROPERTY(EditAnywhere, BlueprintReadWrite)
FOnRecordStepScore OnRecordStepScore
UPROPERTY(BlueprintAssignable, Category = "Story Delegate")
static TArray< FText > GetStoryParameters()
UFUNCTION(BlueprintCallable)
TArray< FStepData > StepData
UPROPERTY(BlueprintReadWrite, Replicated)
FOnStepCompleted OnStepCompleted
UPROPERTY(BlueprintAssignable, Category = "Story Delegate")
bool StoryFinished
UPROPERTY(BlueprintReadOnly)
FOnNewSubStep OnNewSubStep
UPROPERTY(BlueprintAssignable, Category = "Story Delegate")
static int NextStoryIndex
Keeps track of which story should be loaded next by index, saved between levels.
FStoryStep CurrentStep
UPROPERTY(BlueprintReadWrite, Replicated)
FOnEndOfStory OnEndOfStory
UPROPERTY(BlueprintAssignable, Category = "Story Delegate")
int32 StoryIndex
UPROPERTY(BlueprintReadWrite)
TArray< FStepData > PassedStepData
UPROPERTY(BlueprintReadWrite)
TArray< FStoryStep > SubStep
UPROPERTY(BlueprintReadWrite, EditAnywhere)
FStoryStep Step
UPROPERTY(BlueprintReadWrite, EditAnywhere)
FText StepName
UPROPERTY(BlueprintReadWrite, EditAnywhere)
bool Completed
UPROPERTY(BlueprintReadWrite, EditAnywhere)