KLingo Project Documentation 1.0.0
Unreal Engine 5.6 C++ Project Documentation
로딩중...
검색중...
일치하는것 없음
AOutBoxTeleportTrigger 클래스 참조

#include <OutBoxTeleportTrigger.h>

+ AOutBoxTeleportTrigger에 대한 상속 다이어그램 :
+ AOutBoxTeleportTrigger에 대한 협력 다이어그램:

Public 멤버 함수

 AOutBoxTeleportTrigger ()
 

Protected 멤버 함수

virtual void BeginPlay () override
 
void OnBoxBeginOverlap (UPrimitiveComponent *OverlappedComp, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult)
 

Protected 속성

TObjectPtr< class UBoxComponent > BoxComp
 
TObjectPtr< class UStaticMeshComponent > CubeMesh
 
FVector FoodRespawnPoint
 
FVector LuggageRespawnPoint
 
TObjectPtr< class USceneComponent > RootComp
 

상세한 설명

OutBoxTeleportTrigger.h 파일의 10 번째 라인에서 정의되었습니다.

생성자 & 소멸자 문서화

◆ AOutBoxTeleportTrigger()

AOutBoxTeleportTrigger::AOutBoxTeleportTrigger ( )

OutBoxTeleportTrigger.cpp 파일의 16 번째 라인에서 정의되었습니다.

17{
18 PrimaryActorTick.bCanEverTick = false;
19
20 RootComp = CreateDefaultSubobject<USceneComponent>(TEXT("RootComp"));
21 SetRootComponent(RootComp);
22
23 BoxComp = CreateDefaultSubobject<UBoxComponent>(TEXT("BoxComp"));
24 BoxComp->SetupAttachment(GetRootComponent());
25 BoxComp->SetBoxExtent(FVector(50, 50, 50));
26 BoxComp->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
27 BoxComp->SetCollisionObjectType(ECollisionChannel::ECC_WorldStatic);
28 BoxComp->SetCollisionResponseToAllChannels(ECR_Overlap);
29
30 CubeMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("CubeMesh"));
31 ConstructorHelpers::FObjectFinder<UStaticMesh> cubeMeshRef(TEXT("/Script/Engine.StaticMesh'/Engine/BasicShapes/Cube.Cube'"));
32 if (cubeMeshRef.Succeeded())
33 {
34 CubeMesh->SetStaticMesh(cubeMeshRef.Object);
35 }
36 CubeMesh->SetupAttachment(GetRootComponent());
37 CubeMesh->SetCollisionProfileName(TEXT("NoCollision"));
38 CubeMesh->SetCollisionEnabled(ECollisionEnabled::NoCollision);
39 CubeMesh->SetCollisionResponseToAllChannels(ECR_Ignore);
40 CubeMesh->SetVisibility(false);
41}
TObjectPtr< class UBoxComponent > BoxComp
TObjectPtr< class UStaticMeshComponent > CubeMesh
TObjectPtr< class USceneComponent > RootComp

다음을 참조함 : BoxComp, CubeMesh, RootComp.

멤버 함수 문서화

◆ BeginPlay()

void AOutBoxTeleportTrigger::BeginPlay ( )
overrideprotectedvirtual

OutBoxTeleportTrigger.cpp 파일의 43 번째 라인에서 정의되었습니다.

44{
45 Super::BeginPlay();
46
47 AActor* luggageManager = UGameplayStatics::GetActorOfClass(GetWorld(), ALuggageManager::StaticClass());
48 LuggageRespawnPoint = luggageManager->GetActorLocation();
49
50 AActor* teleportOut = UGameplayStatics::GetActorOfClass(GetWorld(), ATeleportOut::StaticClass());
51 FoodRespawnPoint = teleportOut->GetActorLocation();
52
53 BoxComp->OnComponentBeginOverlap.AddDynamic(this, &AOutBoxTeleportTrigger::OnBoxBeginOverlap);
54}
void OnBoxBeginOverlap(UPrimitiveComponent *OverlappedComp, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult)

다음을 참조함 : BoxComp, FoodRespawnPoint, LuggageRespawnPoint, OnBoxBeginOverlap().

+ 이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ OnBoxBeginOverlap()

void AOutBoxTeleportTrigger::OnBoxBeginOverlap ( UPrimitiveComponent *  OverlappedComp,
AActor *  OtherActor,
UPrimitiveComponent *  OtherComp,
int32  OtherBodyIndex,
bool  bFromSweep,
const FHitResult &  SweepResult 
)
protected

OutBoxTeleportTrigger.cpp 파일의 56 번째 라인에서 정의되었습니다.

58{
59 if (Cast<Aluggage>(OtherActor))
60 {
61 OtherActor->SetActorLocation(LuggageRespawnPoint, false, nullptr, ETeleportType::TeleportPhysics);
62 }
63 else if (Cast<AFood>(OtherActor))
64 {
65 OtherActor->SetActorLocation(FoodRespawnPoint, false, nullptr, ETeleportType::TeleportPhysics);
66 }
67}

다음을 참조함 : FoodRespawnPoint, LuggageRespawnPoint.

다음에 의해서 참조됨 : BeginPlay().

+ 이 함수를 호출하는 함수들에 대한 그래프입니다.:

멤버 데이터 문서화

◆ BoxComp

TObjectPtr<class UBoxComponent> AOutBoxTeleportTrigger::BoxComp
protected

OutBoxTeleportTrigger.h 파일의 24 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : AOutBoxTeleportTrigger(), BeginPlay().

◆ CubeMesh

TObjectPtr<class UStaticMeshComponent> AOutBoxTeleportTrigger::CubeMesh
protected

OutBoxTeleportTrigger.h 파일의 27 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : AOutBoxTeleportTrigger().

◆ FoodRespawnPoint

FVector AOutBoxTeleportTrigger::FoodRespawnPoint
protected

OutBoxTeleportTrigger.h 파일의 40 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : BeginPlay(), OnBoxBeginOverlap().

◆ LuggageRespawnPoint

FVector AOutBoxTeleportTrigger::LuggageRespawnPoint
protected

OutBoxTeleportTrigger.h 파일의 39 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : BeginPlay(), OnBoxBeginOverlap().

◆ RootComp

TObjectPtr<class USceneComponent> AOutBoxTeleportTrigger::RootComp
protected

OutBoxTeleportTrigger.h 파일의 21 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : AOutBoxTeleportTrigger().


이 클래스에 대한 문서화 페이지는 다음의 파일들로부터 생성되었습니다.: