-
Notifications
You must be signed in to change notification settings - Fork 0
/
SpawnVolume.h
60 lines (40 loc) · 1.46 KB
/
SpawnVolume.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Critter.h"
#include "Components/BoxComponent.h"
#include "GameFramework/Actor.h"
#include "GameFramework/SpringArmComponent.h"
#include "SpawnVolume.generated.h"
UCLASS()
class UNREALCPPTEST_API ASpawnVolume : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
ASpawnVolume();
UPROPERTY(VisibleAnywhere,BlueprintReadOnly,Category = "Spawning")
UBoxComponent* SpawningBox;
UPROPERTY(EditAnywhere,BlueprintReadOnly,Category ="Spawning")
TSubclassOf<AActor> Actor_1;
UPROPERTY(EditAnywhere,BlueprintReadOnly,Category ="Spawning")
TSubclassOf<AActor> Actor_2;
UPROPERTY(EditAnywhere,BlueprintReadOnly,Category ="Spawning")
TSubclassOf<AActor> Actor_3;
UPROPERTY(EditAnywhere,BlueprintReadOnly,Category ="Spawning")
TSubclassOf<AActor> Actor_4;
TArray<TSubclassOf<AActor>>SpawnActorArray;
ACritter* SpawnActor;
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
UFUNCTION(BlueprintPure,Category = "Spawning")
FVector GetSpawnpont();
UFUNCTION(BlueprintPure,Category = "Spawning")
TSubclassOf<AActor> GetSpawnActor();
UFUNCTION(BlueprintNativeEvent,BlueprintCallable,Category = "Spawning")
void SpawnOurActor(UClass* SpawnClass,const FVector& location);
};