-
Notifications
You must be signed in to change notification settings - Fork 0
/
SpawnLevel.h
85 lines (53 loc) · 1.79 KB
/
SpawnLevel.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "BaseLevel.h" // Assuming this is the correct header for ABaseLevel
#include "SpawnLevel.generated.h"
class ABaseLevel;
UCLASS()
class MYVGFINALPROJECT_API ASpawnLevel : public AActor
{
GENERATED_BODY()
public:
ASpawnLevel();
protected:
virtual void BeginPlay() override;
public:
virtual void Tick(float DeltaTime) override;
public:
UFUNCTION()
void SpawnLevel(bool IsFirst);
UFUNCTION()
void OnOverlapBegin(UPrimitiveComponent* OverlappedComp,
AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex,
bool bFromSweep, const FHitResult& SweepResult);
protected:
APawn* Player;
UPROPERTY(EditAnywhere)
TSubclassOf<ABaseLevel> Level1;
UPROPERTY(EditAnywhere)
TSubclassOf<ABaseLevel> Level2;
UPROPERTY(EditAnywhere)
TSubclassOf<ABaseLevel> Level3;
UPROPERTY(EditAnywhere)
TSubclassOf<ABaseLevel> Level4;
UPROPERTY(EditAnywhere)
TSubclassOf<ABaseLevel> Level5;
UPROPERTY(EditAnywhere)
TSubclassOf<ABaseLevel> Level6;
UPROPERTY(EditAnywhere)
TSubclassOf<ABaseLevel> Level7;
UPROPERTY(EditAnywhere)
TSubclassOf<ABaseLevel> Level8;
UPROPERTY(EditAnywhere)
TSubclassOf<ABaseLevel> Level9;
UPROPERTY(EditAnywhere)
TSubclassOf<ABaseLevel> Level10;
TArray<ABaseLevel*> LevelList;
public:
int RandomLevel;
FVector SpawnLocation = FVector();
FRotator SpawnRotation = FRotator();
FActorSpawnParameters SpawnInfo = FActorSpawnParameters();
};