#include <ProjectileSpawnSystemComponent.h>
◆ UProjectileSpawnSystemComponent()
| UProjectileSpawnSystemComponent::UProjectileSpawnSystemComponent |
( |
| ) |
|
13{
14 PrimaryComponentTick.bCanEverTick = false;
15}
◆ ClearAll()
| void UProjectileSpawnSystemComponent::ClearAll |
( |
const bool |
bClearSpawnedActorsToo = true | ) |
|
|
overridevirtual |
ISpawnSystemInterface를 구현.
25{
27 {
28 return;
29 }
30
31
32
35
36 if (bClearSpawnedActorsToo == false)
37 {
38 return;
39 }
40
41 const AActor* Owner = GetOwner();
42
44 {
45 if (Projectile == nullptr || IsValid(Projectile) == false)
46 {
47 continue;
48 }
49
51 {
52 continue;
53 }
54
56 }
57}
Definition ProjectileBase.h:81
TMap< TObjectPtr< UObject >, FProjectileContainer > ProjectileContainerMap
Definition ProjectileSpawnSystemComponent.h:52
TArray< AProjectileBase * > GetAllSpawnedProjectiles() const
Definition ProjectileSpawnSystemComponent.cpp:136
◆ DespawnProjectile()
| void UProjectileSpawnSystemComponent::DespawnProjectile |
( |
UObject * |
Outer, |
|
|
AProjectileBase * |
Projectile |
|
) |
| |
90{
91 if (IsValid(Projectile) == false)
92 {
94 return;
95 }
96
98
99
100 if (Container ==
nullptr || Container->
Projectiles.Remove(Projectile) == 0)
101 {
102 return;
103 }
104
106 {
108 }
109
110
112 {
114 }
115}
#define LOG_ERROR(Category, Format,...)
Definition CK_UE.h:40
#define NAMEOF(Type)
Definition CK_UE.h:30
FORCEINLINE EProjectileState GetProjectileState() const
Definition ProjectileBase.h:100
virtual void ForceEarlyFinish(const AActor *Terminator, const EProjectileFinishReason FinishReason)
Definition ProjectileBase.cpp:181
Definition ProjectileSpawnSystemComponent.h:16
TArray< TObjectPtr< AProjectileBase > > Projectiles
Definition ProjectileSpawnSystemComponent.h:21
◆ GetAllSpawnedProjectileCount()
| int32 UProjectileSpawnSystemComponent::GetAllSpawnedProjectileCount |
( |
| ) |
const |
119{
121 {
122 return 0;
123 }
124
125 int32 Result = 0;
126
128 {
129 Result += Container.Projectiles.Num();
130 }
131
132 return Result;
133}
◆ GetAllSpawnedProjectiles()
| TArray< AProjectileBase * > UProjectileSpawnSystemComponent::GetAllSpawnedProjectiles |
( |
| ) |
const |
137{
139 {
140 return TArray<AProjectileBase*>();
141 }
142
143 TArray<AProjectileBase*> Result;
145
147 {
148 Result.Append(Container.Projectiles);
149 }
150
151 return Result;
152}
int32 GetAllSpawnedProjectileCount() const
Definition ProjectileSpawnSystemComponent.cpp:118
◆ Initialize()
ISpawnSystemInterface를 구현.
19{
21}
TWeakObjectPtr< UStageManagementSubsystem > StageManagementSystem
Definition ProjectileSpawnSystemComponent.h:55
◆ IsComponentTickEnabled()
| bool UProjectileSpawnSystemComponent::IsComponentTickEnabled |
( |
| ) |
const |
|
overridevirtual |
61{
62 return Super::IsComponentTickEnabled();
63}
◆ SpawnProjectile()
| AProjectileBase * UProjectileSpawnSystemComponent::SpawnProjectile |
( |
UObject * |
Outer, |
|
|
const TSubclassOf< AProjectileBase > |
ProjectileClass, |
|
|
const FVector & |
Location, |
|
|
const FRotator & |
Rotation |
|
) |
| |
67{
68 if (ProjectileClass == nullptr)
69 {
70 LOG_ERROR(LogCK,
"ProjectileClass가 nullptr입니다.");
71 return nullptr;
72 }
73
75 AActor* Spawned = Pool->
GetActorFromPool(ProjectileClass, Location, Rotation);
77
78 if (Projectile == nullptr)
79 {
81 return nullptr;
82 }
83
85 return Projectile;
86}
Definition PoolWorldSubsystem.h:28
AActor * GetActorFromPool(TSubclassOf< AActor > ActorClass, FVector Location, FRotator Rotation)
Definition PoolWorldSubsystem.cpp:203
◆ ProjectileContainerMap
| TMap<TObjectPtr<UObject>, FProjectileContainer> UProjectileSpawnSystemComponent::ProjectileContainerMap |
|
private |
◆ StageManagementSystem
이 클래스에 대한 문서화 페이지는 다음의 파일들로부터 생성되었습니다.: