Files
ActorSpawningPlugin/Source/ActorSpawningPlugin/Public/SpawnableActor.h
T
Brandon Thomas 66cdfd5f6f Async sound playing works! (in vocodes plugin only)
I haven't spawned this new actor type yet...
2021-03-07 03:13:50 -05:00

44 lines
883 B
C++

#pragma once
// Unreal Core
#include "CoreMinimal.h"
#include "UObject/NoExportTypes.h"
#include "Engine/EngineTypes.h"
// EventCenterPlugin
#include "SpawnableActor.generated.h"
DECLARE_LOG_CATEGORY_EXTERN(SpawnableActorLog, Log, All);
// NB(bt): "Blueprintable" seems to remove the ability to add BP event nodes.
UCLASS()
class ACTORSPAWNINGPLUGIN_API ASpawnableActor : public AActor
{
GENERATED_BODY()
public:
ASpawnableActor();
~ASpawnableActor();
/** Set a timer to destroy this actor. */
void StartDestroyTimer(float seconds);
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
virtual void BeginDestroy() override;
// Destroy timer callback.
void InvokeDestroy();
// (Optional) destroy callback timer.
FTimerHandle DestroyTimer;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
};