5#include "CoreMinimal.h"
6#include "UObject/Object.h"
7#include "BaseEvent.generated.h"
21 FCompareResult(
const FGuid& Guid,
const TArray<uint8>& WrongOptions,
const uint8 Key)
23 InspectedObjectGuid = Guid;
24 WrongOptionsIDs = WrongOptions;
25 LocalizationKey = Key;
28 GenerateUniqueResultID(WrongOptions, Guid);
33 void GenerateUniqueResultID(
const TArray<uint8>& Actions,
const FGuid& Guid)
35 UniqueResultID = Guid.ToString();
37 for(uint8 Type : Actions)
39 UniqueResultID.Append(FString::FromInt(Type));
45 UPROPERTY() bool bValidResult;
47 UPROPERTY() FString UniqueResultID;
48 UPROPERTY() FGuid InspectedObjectGuid;
50 UPROPERTY() TArray<uint8> WrongOptionsIDs;
51 UPROPERTY() TArray<uint8> SelectedOptionsIDs;
53 UPROPERTY() uint8 LocalizationKey;
54 UPROPERTY() TArray<FString> LocalizedWrongOptions;
69 void Initialize(APlayerController* NewExecutor);
70 APlayerController* GetExecutor() const;
71 const FGuid& GetGuid()
const {
return Guid; }
73 virtual bool Lock() final;
74 virtual
void Unlock() final;
80 UE_LOG(LogTemp, Warning, TEXT(
"Compare is not implemented for this type of event = %s"), *Event->GetName());
88 APlayerController* Executor;
91 TAtomic<int32> ListenersNum;
The UBaseEvent class serves as the base class for all events for our event-managers system....
TAtomic< int32 > ListenersNum
const FGuid & GetGuid() const
APlayerController * Executor
UPROPERTY()
TArray< uint8 > SelectedOptionsIDs
UPROPERTY()
FCompareResult(const FGuid &Guid, const TArray< uint8 > &WrongOptions, const uint8 Key)
void GenerateUniqueResultID(const TArray< uint8 > &Actions, const FGuid &Guid)
FGuid InspectedObjectGuid
UPROPERTY()
bool bValidResult
UPROPERTY()
uint8 LocalizationKey
UPROPERTY()
TArray< uint8 > WrongOptionsIDs
UPROPERTY()
FString UniqueResultID
UPROPERTY()