Oakfolks Gold_1.14
Oakfolks coop game
Loading...
Searching...
No Matches
QTETypes.h
1#pragma once
2
3#include "CoreMinimal.h"
4#include "InputCoreTypes.h"
5#include "Blueprint/UserWidget.h"
6#include "QTETypes.generated.h"
7
9
14UENUM(BlueprintType)
15enum class EQTEResult : uint8 {
16 None UMETA(DisplayName = "None"),
17 Success UMETA(DisplayName = "Success"),
18 Failure UMETA(DisplayName = "Failure")
19};
20
25UENUM(BlueprintType)
26enum class EQTEActionType : uint8 {
27 None UMETA(DisplayName = "None"),
28 Press UMETA(DisplayName = "Press"),
29 Hold UMETA(DisplayName = "Hold"),
30 Release UMETA(DisplayName = "Release"),
31 Rotate UMETA(DisplayName = "Rotate")
32};
33
38UENUM(BlueprintType)
39enum class EQTEState : uint8 {
40 Inactive,
41 WaitingForPlayers,
42 Running,
43 Paused,
44 Completed,
45 Failed
46};
47
52UENUM(BlueprintType)
53enum class ESnapPointType : uint8 {
54 First,
55 Second
56};
57
59
64USTRUCT()
66{
67 GENERATED_BODY()
68
69 int32 SuccessCount = 0;
70 bool bIsComplete = false;
71
73};
74
79USTRUCT(BlueprintType)
80struct BCR_API FSnapPointConfig {
81 GENERATED_BODY()
82
83 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "QTE")
84 ESnapPointType SnapPointType = ESnapPointType::First;
85
86 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "QTE")
87 EQTEActionType ActionType = EQTEActionType::None;
88
89 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "QTE")
90 FKey RequiredInput;
91
92 // Nombre de fois que l'action doit être répétée (-1 pour infini)
93 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "QTE",
94 Meta = (ClampMin = "-1", ToolTip = "Nombre de répétitions (-1 pour infini)"))
95 int32 RepeatCount = 1;
96
97 // Pour les actions de rotation uniquement : vitesse minimale requise
98 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "QTE",
99 Meta = (EditCondition = "ActionType == EQTEActionType::Rotate"))
100 float MinRotationSpeed = 0.5f;
101};
102
107USTRUCT(BlueprintType)
108struct BCR_API FQTEConfiguration {
109 GENERATED_BODY()
110
111 // Configuration pour chaque point d'interaction
112 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "QTE")
113 TArray<FSnapPointConfig> SnapPoints;
114
115 // Temps total alloué pour compléter le QTE (-1 pour illimité)
116 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "QTE")
117 float TotalTime = -1.0f;
118
119 // Widget à afficher pendant le QTE
120 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "QTE")
121 TSubclassOf<UUserWidget> WidgetClass;
122
123 // Nom pour l'identification (optionnel)
124 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "QTE")
125 FString ConfigurationName = TEXT("New QTE");
126
127 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "QTE")
128 bool ActionShouldWaitOtherPlayer = false;
129};
130
135USTRUCT(BlueprintType)
136struct BCR_API FQTEActionProgress {
137 GENERATED_BODY()
138
139 // Progression normalisée (0-1)
140 UPROPERTY(BlueprintReadOnly)
141 float Progress = 0.0f;
142
143 // Position du stick pour les actions de rotation
144 UPROPERTY(BlueprintReadOnly)
145 FVector2D StickPosition = FVector2D::ZeroVector;
146
147 // État actif/inactif de l'action
148 UPROPERTY(BlueprintReadOnly)
149 bool bIsActive = false;
150
151 FQTEActionProgress() = default;
152};
Real-time QTE action progress information.
Definition QTETypes.h:136
Complete QTE sequence configuration.
Definition QTETypes.h:108
Internal progress tracking for QTE actions.
Definition QTETypes.h:66
Configuration for a single snap point in QTE.
Definition QTETypes.h:80