LEAP Documentation 40220
Documentation for the LEAP project
ExperienceEvent.h
Go to the documentation of this file.
1// Copyright Blue Isle Studios Inc 2018. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "PlayerStats.h"
7#include "UObject/NoExportTypes.h"
8#include "ExperienceEvent.generated.h"
9
14class USoundBase;
15
16UCLASS(Blueprintable)
17class PROJECTX_API UExperienceEvent : public UObject
18{
19 GENERATED_BODY()
20public:
21 UFUNCTION(BlueprintPure, Category = ExperienceEvent)
22 FORCEINLINE FText GetMessage() { return Message; }
23 UFUNCTION(BlueprintPure, Category = ExperienceEvent)
24 FORCEINLINE int32 GetExperience() const { return Experience; }
25 UFUNCTION(BlueprintPure, Category = ExperienceEvent)
26 FORCEINLINE EDisplayType GetDisplayType() { return DisplayType; }
27 UFUNCTION(BlueprintPure, Category = ExperienceEvent)
28 FORCEINLINE USoundBase* GetSound() { return Sound; }
29 UFUNCTION(BlueprintPure, Category = ExperienceEvent)
30 FORCEINLINE bool GetShowOverheadNotification() { return bShowOverheadNotification; }
31 UFUNCTION(BlueprintPure, Category = ExperienceEvent)
32 FORCEINLINE float GetOverheadNotificationDuration() { return OverheadNotificationDuration; }
33
34protected:
35 /* Message to print on the screen*/
36 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
37 FText Message = FText::FromString("");
38 /* Amount of experience rewarded for the event*/
39 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
40 int32 Experience = 0;
41 /*Where on the screen to display the message*/
42 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
44 /* Sound to play when the event is triggered*/
45 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
46 class USoundBase* Sound = NULL;
47 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
48 bool bShowOverheadNotification = false;
49 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, meta=(EditCondition="bShowOverheadNotification"))
50 float OverheadNotificationDuration = 1.f;
51
52};
EDisplayType
Definition: PlayerStats.h:151
Definition: ExperienceEvent.h:18