Add class Tagger
This commit is contained in:
parent
47b7512af7
commit
1e43990faa
|
@ -0,0 +1,27 @@
|
|||
// CARLA, Copyright (C) 2017 Computer Vision Center (CVC)
|
||||
|
||||
#include "Carla.h"
|
||||
#include "Tagger.h"
|
||||
|
||||
ATagger::ATagger()
|
||||
{
|
||||
PrimaryActorTick.bCanEverTick = false;
|
||||
}
|
||||
|
||||
#if WITH_EDITOR
|
||||
void ATagger::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
|
||||
{
|
||||
Super::PostEditChangeProperty(PropertyChangedEvent);
|
||||
if (PropertyChangedEvent.Property) {
|
||||
if (bTriggerTagObjects) {
|
||||
TagObjects();
|
||||
}
|
||||
}
|
||||
bTriggerTagObjects = false;
|
||||
}
|
||||
#endif // WITH_EDITOR
|
||||
|
||||
void ATagger::TagObjects()
|
||||
{
|
||||
// Do stuff here.
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
// CARLA, Copyright (C) 2017 Computer Vision Center (CVC)
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "GameFramework/Actor.h"
|
||||
#include "Tagger.generated.h"
|
||||
|
||||
UCLASS()
|
||||
class CARLA_API ATagger : public AActor
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
|
||||
ATagger();
|
||||
|
||||
protected:
|
||||
|
||||
#if WITH_EDITOR
|
||||
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
|
||||
#endif // WITH_EDITOR
|
||||
|
||||
private:
|
||||
|
||||
void TagObjects();
|
||||
|
||||
UPROPERTY(Category = "Tagger", EditAnywhere)
|
||||
bool bTriggerTagObjects = false;
|
||||
};
|
Loading…
Reference in New Issue