A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
DialogueDataClassesAndStructs.h
Go to the documentation of this file.
1// Copyright(c) 2018 PixoVR, LLC. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Sound/DialogueWave.h"
7#include "DlgNodeData.h"
8#include "DialogueDataClassesAndStructs.generated.h"
9
10USTRUCT(BlueprintType)
11struct FPlayerAnswer
12{
15public:
17 {
18 AnswerText = FText();
19 Score = 0.0f;
20 }
21
22 FPlayerAnswer(FText inAnswerText, float inScore)
23 {
24 AnswerText = inAnswerText;
25 Score = inScore;
26 }
27
28public:
29 UPROPERTY(BlueprintReadWrite, EditAnywhere)
31
32 UPROPERTY(BlueprintReadWrite, EditAnywhere)
33 float Score = 0.0f;
34};
35
36USTRUCT(BlueprintType)
38{
39 GENERATED_USTRUCT_BODY()
41 {
42 PhoneOrNarratedDialogueWaves = TArray<UDialogueWave*>();
43 RadioDialogueWaves = TArray<UDialogueWave*>();
44 }
45
46 FDeviceBasedDialogue(TArray<UDialogueWave*> inPhoneOrNarratedDialogueWaves, TArray<UDialogueWave*> inRadioDialogueWaves)
47 {
48 PhoneOrNarratedDialogueWaves = inPhoneOrNarratedDialogueWaves;
49 RadioDialogueWaves = inRadioDialogueWaves;
50 }
52public:
53 UPROPERTY(BlueprintReadWrite, EditAnywhere)
54 TArray<UDialogueWave*> PhoneOrNarratedDialogueWaves = TArray<UDialogueWave*>();
55
56 UPROPERTY(BlueprintReadWrite, EditAnywhere)
57 TArray<UDialogueWave*> RadioDialogueWaves = TArray<UDialogueWave*>();
58};
59
60USTRUCT(BlueprintType)
62{
63 GENERATED_USTRUCT_BODY()
65 {
66 bShouldBeDisplayedToUser = false;
68 PlayerResponse = FText::FromStringTable("/Game/Blueprints/DataTables/ST_UITextFolder/ST_UIText.ST_UIText", "Ok", EStringTableLoadingPolicy::FindOrLoad);
69 }
70
71 FAudioRemediation(bool inShouldBeDisplayedToUser, FDeviceBasedDialogue inDialogue, FText inPlayerResponse)
72 {
73 bShouldBeDisplayedToUser = inShouldBeDisplayedToUser;
74 Dialogue = inDialogue;
75 PlayerResponse = inPlayerResponse;
76 }
77
78public:
79 UPROPERTY(BlueprintReadWrite, EditAnywhere)
80 bool bShouldBeDisplayedToUser = false;
81
82 UPROPERTY(BlueprintReadWrite, EditAnywhere)
84
85 UPROPERTY(BlueprintReadWrite, EditAnywhere)
86 FText PlayerResponse = FText::FromStringTable("/Game/Blueprints/DataTables/ST_UITextFolder/ST_UIText.ST_UIText", "Ok", EStringTableLoadingPolicy::FindOrLoad);
87};
89USTRUCT(BlueprintType)
90struct FGenericAudio
91{
92 GENERATED_USTRUCT_BODY()
94 {
95 DelayBeforePlayingAudio = 2.0f;
96 bShouldBeDisplayedToUser = false;
98 }
99
100 FGenericAudio(float inDelayBeforePlayingAudio, bool inShouldBeDisplayedToUser, FDeviceBasedDialogue inDialogue)
101 {
102 DelayBeforePlayingAudio = inDelayBeforePlayingAudio;
103 bShouldBeDisplayedToUser = inShouldBeDisplayedToUser;
104 Dialogue = inDialogue;
105 }
106
107public:
108 UPROPERTY(BlueprintReadWrite, EditAnywhere)
109 float DelayBeforePlayingAudio = 2.0f;
110
111 UPROPERTY(BlueprintReadWrite, EditAnywhere)
112 bool bShouldBeDisplayedToUser = false;
113
114 UPROPERTY(BlueprintReadWrite, EditAnywhere)
117
118USTRUCT(BlueprintType)
120{
121 GENERATED_USTRUCT_BODY()
122
124 {
125 DelayBeforePlaying = 2.0f;
126 Dialogue = nullptr;
127 }
128
129 FChatterSingleLine(float inDelayBeforePlaying, UDialogueWave* inDialogue)
131 DelayBeforePlaying = inDelayBeforePlaying;
132 Dialogue = inDialogue;
134
135public:
136 UPROPERTY(BlueprintReadWrite, EditAnywhere)
137 float DelayBeforePlaying = 2.0f;
138
139 UPROPERTY(BlueprintReadWrite, EditAnywhere)
140 UDialogueWave* Dialogue = nullptr;
141};
142
143USTRUCT(BlueprintType)
144struct FChatterGroup
145{
146 GENERATED_USTRUCT_BODY()
147
149 {
150 DelayBeforePlaying = 2.0f;
151 ChatterLines = TArray<FChatterSingleLine>();
152 }
154 FChatterGroup(float inDelayBeforePlaying, TArray<FChatterSingleLine> inChatterLines)
155 {
156 DelayBeforePlaying = inDelayBeforePlaying;
157 ChatterLines = inChatterLines;
158 }
159
160public:
161 UPROPERTY(BlueprintReadWrite, EditAnywhere)
162 float DelayBeforePlaying = 2.0f;
163
164 UPROPERTY(BlueprintReadWrite, EditAnywhere)
165 TArray<FChatterSingleLine> ChatterLines = TArray<FChatterSingleLine>();
166};
168USTRUCT(BlueprintType)
169struct FQuestion
170{
172
173 FQuestion()
175 DelayBeforePlaying = 2.0f;
177 PossibleScoreAmount = 1.0f;
178 Answers = TArray<FPlayerAnswer>();
180 }
181
182 FQuestion(float inDelayBeforePlaying, FString inQuestionID, FDeviceBasedDialogue inDialogue, float inPossibleScoreAmount, TArray<FPlayerAnswer> inAnswers, int inCorrectAnswerIndex)
183 {
184 QuestionID = inQuestionID;
185 DelayBeforePlaying = inDelayBeforePlaying;
186 Dialogue = inDialogue;
187 PossibleScoreAmount = inPossibleScoreAmount;
188 Answers = inAnswers;
189 CorrectAnswerIndex = inCorrectAnswerIndex;
190 }
191
192public:
193 UPROPERTY(BlueprintReadWrite, EditAnywhere)
194 float DelayBeforePlaying = 2.0f;
195
196 // Figure out how to assign these by default
197 UPROPERTY(BlueprintReadWrite, EditAnywhere)
198 FString QuestionID = FGuid::NewGuid().ToString();
199
200 UPROPERTY(BlueprintReadWrite, EditAnywhere)
202
203 UPROPERTY(BlueprintReadWrite, EditAnywhere)
204 float PossibleScoreAmount = 1.0f;
205
206 UPROPERTY(BlueprintReadWrite, EditAnywhere)
207 int CorrectAnswerIndex = 0;
208
209 UPROPERTY(BlueprintReadWrite, EditAnywhere)
211};
213UCLASS(Blueprintable, BlueprintType, EditInlineNew, HideCategories = ("DoNotShow"), CollapseCategories, AutoExpandCategories = ("Default"))
215{
216 GENERATED_BODY()
217
218public:
219 UPROPERTY(BlueprintReadWrite, EditAnywhere)
220 FLinearColor NodeColor = FLinearColor(0.0f, 0.2f, 1.0f);
221};
222
223UCLASS(Blueprintable, BlueprintType, EditInlineNew, HideCategories = ("DoNotShow"), CollapseCategories, AutoExpandCategories = ("Default"))
224class DLGSYSTEM_API UEventData : public UBaseDlgDataClass
225{
226 GENERATED_BODY()
227
228public:
229 UEventData()
230 {
231 NodeColor = FLinearColor(.95f, .32f, .12f);
233
234 UPROPERTY(BlueprintReadWrite, EditAnywhere)
235 FName EventName = FName();
236};
237
238UCLASS(Blueprintable, BlueprintType, EditInlineNew, HideCategories = ("DoNotShow"), CollapseCategories, AutoExpandCategories = ("Default"))
239class DLGSYSTEM_API URemediationData : public UBaseDlgDataClass
240{
241 GENERATED_BODY()
242
243public:
245 {
246 NodeColor = FLinearColor(.65f, .28f, 1.0f);
247 }
249 UPROPERTY(BlueprintReadWrite, EditAnywhere)
251};
252
253UCLASS(Blueprintable, BlueprintType, EditInlineNew, HideCategories = ("DoNotShow"), CollapseCategories, AutoExpandCategories = ("Default"))
254class DLGSYSTEM_API URadioChatterData : public UBaseDlgDataClass
255{
256 GENERATED_BODY()
257
258public:
260 {
261 NodeColor = FLinearColor(0.598958f, 0.388297f, 0.0f);
262 }
263
264 UPROPERTY(BlueprintReadWrite, EditAnywhere)
265 FChatterGroup RadioChatter = FChatterGroup();
266};
267
268UCLASS(Blueprintable, BlueprintType, EditInlineNew, HideCategories = ("DoNotShow"), CollapseCategories, AutoExpandCategories = ("Default"))
269class DLGSYSTEM_API UGenericAudioData : public UBaseDlgDataClass
270{
271 GENERATED_BODY()
272
273public:
276 NodeColor = FLinearColor(0.020045f, 0.598958f, 0.0f);
277 }
278
279 UPROPERTY(BlueprintReadWrite, EditAnywhere)
280 FGenericAudio GenericAudioData = FGenericAudio();
281};
282
283UCLASS(Blueprintable, BlueprintType, EditInlineNew, HideCategories = ("DoNotShow"), CollapseCategories, AutoExpandCategories = ("Default"))
284class DLGSYSTEM_API UQuestionData : public UBaseDlgDataClass
285{
286 GENERATED_BODY()
287
288public:
289 UPROPERTY(BlueprintReadWrite, EditAnywhere)
290 FQuestion QuestionData = FQuestion();
291};
292
293UCLASS(Blueprintable, BlueprintType, EditInlineNew, HideCategories = ("DoNotShow"), CollapseCategories, AutoExpandCategories = ("Default"))
294class DLGSYSTEM_API UDelayData : public UBaseDlgDataClass
295{
296 GENERATED_BODY()
298public:
299 UDelayData()
300 {
301 NodeColor = FLinearColor(.28f, 1.0f, .75f);
302 }
303
304 UPROPERTY(BlueprintReadWrite, EditAnywhere)
305 float DelayTime = 0.0f;
306};
UCLASS(Blueprintable, BlueprintType, EditInlineNew, HideCategories = ("DoNotShow"),...
UCLASS(Blueprintable, BlueprintType, EditInlineNew, HideCategories = ("DoNotShow"),...
UCLASS(Blueprintable, BlueprintType, Abstract, EditInlineNew, CollapseCategories)
Definition DlgNodeData.h:32
UCLASS(Blueprintable, BlueprintType, EditInlineNew, HideCategories = ("DoNotShow"),...
UCLASS(Blueprintable, BlueprintType, EditInlineNew, HideCategories = ("DoNotShow"),...
UCLASS(Blueprintable, BlueprintType, EditInlineNew, HideCategories = ("DoNotShow"),...
UCLASS(Blueprintable, BlueprintType, EditInlineNew, HideCategories = ("DoNotShow"),...
UCLASS(Blueprintable, BlueprintType, EditInlineNew, HideCategories = ("DoNotShow"),...
FText PlayerResponse
UPROPERTY(BlueprintReadWrite, EditAnywhere)
FAudioRemediation(bool inShouldBeDisplayedToUser, FDeviceBasedDialogue inDialogue, FText inPlayerResponse)
FDeviceBasedDialogue Dialogue
UPROPERTY(BlueprintReadWrite, EditAnywhere)
bool bShouldBeDisplayedToUser
UPROPERTY(BlueprintReadWrite, EditAnywhere)
USTRUCT(BlueprintType)
TArray< FChatterSingleLine > ChatterLines
UPROPERTY(BlueprintReadWrite, EditAnywhere)
FChatterGroup(float inDelayBeforePlaying, TArray< FChatterSingleLine > inChatterLines)
float DelayBeforePlaying
UPROPERTY(BlueprintReadWrite, EditAnywhere)
FChatterSingleLine(float inDelayBeforePlaying, UDialogueWave *inDialogue)
float DelayBeforePlaying
UPROPERTY(BlueprintReadWrite, EditAnywhere)
UDialogueWave * Dialogue
UPROPERTY(BlueprintReadWrite, EditAnywhere)
FDeviceBasedDialogue(TArray< UDialogueWave * > inPhoneOrNarratedDialogueWaves, TArray< UDialogueWave * > inRadioDialogueWaves)
TArray< UDialogueWave * > PhoneOrNarratedDialogueWaves
UPROPERTY(BlueprintReadWrite, EditAnywhere)
TArray< UDialogueWave * > RadioDialogueWaves
UPROPERTY(BlueprintReadWrite, EditAnywhere)
USTRUCT(BlueprintType)
float DelayBeforePlayingAudio
UPROPERTY(BlueprintReadWrite, EditAnywhere)
bool bShouldBeDisplayedToUser
UPROPERTY(BlueprintReadWrite, EditAnywhere)
FGenericAudio(float inDelayBeforePlayingAudio, bool inShouldBeDisplayedToUser, FDeviceBasedDialogue inDialogue)
FDeviceBasedDialogue Dialogue
UPROPERTY(BlueprintReadWrite, EditAnywhere)
USTRUCT(BlueprintType)
float Score
UPROPERTY(BlueprintReadWrite, EditAnywhere)
FPlayerAnswer(FText inAnswerText, float inScore)
FText AnswerText
UPROPERTY(BlueprintReadWrite, EditAnywhere)
USTRUCT(BlueprintType)
GENERATED_USTRUCT_BODY()
int CorrectAnswerIndex
UPROPERTY(BlueprintReadWrite, EditAnywhere)
FString QuestionID
UPROPERTY(BlueprintReadWrite, EditAnywhere)
FDeviceBasedDialogue Dialogue
UPROPERTY(BlueprintReadWrite, EditAnywhere)
FQuestion(float inDelayBeforePlaying, FString inQuestionID, FDeviceBasedDialogue inDialogue, float inPossibleScoreAmount, TArray< FPlayerAnswer > inAnswers, int inCorrectAnswerIndex)
float DelayBeforePlaying
UPROPERTY(BlueprintReadWrite, EditAnywhere)
TArray< FPlayerAnswer > Answers
UPROPERTY(BlueprintReadWrite, EditAnywhere)
float PossibleScoreAmount
UPROPERTY(BlueprintReadWrite, EditAnywhere)