Skip to content

Commit

Permalink
added observerType ENUM
Browse files Browse the repository at this point in the history
  • Loading branch information
Roberto De Ioris committed Jan 4, 2018
1 parent 8e23e76 commit 400a204
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions Plugins/MaRLEnE/Source/MaRLEnE/Public/MLObserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@
#include "Editor/PropertyEditor/Public/DetailLayoutBuilder.h"
#include "MLObserver.generated.h"

UENUM(BlueprintType) //"BlueprintType" is essential to include
enum class EObserverType : uint8
{
Normal UMETA(DisplayName = "Normal"),
Reward UMETA(DisplayName = "Reward (accum.)"),
IsTerminal UMETA(DisplayName = "Is-Terminal")
};

USTRUCT()
struct FMLObservedProperty
{
Expand Down Expand Up @@ -62,12 +70,12 @@ class FMLObservedPropertyDetails : public IPropertyTypeCustomization
};


UCLASS( ClassGroup=MaRLEnE, meta=(BlueprintSpawnableComponent), HideCategories(Mobility, Rendering, LOD, Collision, Physics, Activation, Cooking) )
UCLASS(ClassGroup = MaRLEnE, meta = (BlueprintSpawnableComponent), HideCategories(Mobility, Rendering, LOD, Collision, Physics, Activation, Cooking))
class MARLENE_API UMLObserver : public USceneComponent
{
GENERATED_BODY()

public:
public:
// Sets default values for this component's properties
UMLObserver();

Expand All @@ -79,6 +87,9 @@ class MARLENE_API UMLObserver : public USceneComponent
UPROPERTY(EditAnywhere)
bool bScreenCapture;

UPROPERTY(EditAnywhere)
EObserverType ObserverType;

UPROPERTY(EditAnywhere, Category = ObservedProperties)
TArray<FMLObservedProperty> ObservedProperties;

Expand All @@ -100,10 +111,10 @@ class MARLENE_API UMLObserver : public USceneComponent
UBillboardComponent *BillboardComponent;


public:
public:
// Called every frame
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;



};

0 comments on commit 400a204

Please sign in to comment.