Shaun Reed f1695a165e Spawn and delete fireballs using new keybinds
+ Follow UE4 example for spawning and destroying actors
+ https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/SpawnAndDestroyActors/
+ This version uses hybrid C++ and Blueprints instead of doing one or the other
+ Functions to spawn and delete fireballs exposed by UFUNCTION() prefix
2022-01-12 17:40:35 -05:00

32 lines
676 B
C++

// All content (c) Shaun Reed 2021, all rights reserved
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "ActorSpawner.generated.h"
UCLASS(Blueprintable)
class THIRDPERSON_API AActorSpawner : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
AActorSpawner();
UFUNCTION(BlueprintCallable, Category = "Spawn")
void SpawnActor();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
class UBoxComponent* SpawnVolume;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
};