Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
InteractableSpawnSystemComponent.h
이 파일의 문서화 페이지로 가기
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Components/ActorComponent.h"
8#include "InteractableSpawnSystemComponent.generated.h"
9
13
14
15//Spawn Hub에서만 사용되는 '상호작용이 가능한 오브젝트를 스폰'하는 시스템 컴포넌트이다.
16UCLASS(ClassGroup=(Custom), BlueprintType)
17class CK_UE_API UInteractableSpawnSystemComponent : public UActorComponent, public ISpawnSystemInterface
18{
19 GENERATED_BODY()
20
21public:
23
24public:
25 virtual void Initialize(UStageManagementSubsystem* InStageManagementSubsystem) override;
26 virtual void ClearAll(const bool bClearSpawnedActors = true) override;
27 virtual void CollectSpawnedTargetables(TArray<ITargetableInterface*>& OutTargetables) const override;
28
29public:
30 AActor* SpawnInteractableActor(TSubclassOf<AActor> InteractableClass, const FVector& Location, const FRotator& Rotation);
31 void DespawnInteractableActor(AActor* Interactable);
32
33public:
34 FORCEINLINE TArray<AInteractableActor*> GetAllSpawnedInteractableActors() const
35 {
36 return SpawnedInteractableActors;
37 }
38
40 {
41 return SpawnedInteractableActors.IsEmpty() ? nullptr : SpawnedInteractableActors.Last();
42 }
43
44private:
45 UPROPERTY(Transient)
46 TWeakObjectPtr<UStageManagementSubsystem> StageManagementSystem;
47
48 UPROPERTY(Transient)
49 TArray<TObjectPtr<AInteractableActor>> SpawnedInteractableActors;
50};
Definition InteractableActor.h:16
Definition SpawnSystemInterface.h:24
Definition TargetableInterface.h:20
Definition InteractableSpawnSystemComponent.h:18
FORCEINLINE TArray< AInteractableActor * > GetAllSpawnedInteractableActors() const
Definition InteractableSpawnSystemComponent.h:34
FORCEINLINE AInteractableActor * GetRecentlySpawnInteractableActor() const
Definition InteractableSpawnSystemComponent.h:39
Definition StageManagementSubsystem.h:147