Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
ULPP_ByPlayerStart 클래스 참조

#include <LPP_ByPlayerStart.h>

ULPP_ByPlayerStart에 대한 상속 다이어그램 :
Inheritance graph
ULPP_ByPlayerStart에 대한 협력 다이어그램:
Collaboration graph

Public 멤버 함수

virtual void PlacePlayer (UWorld *InWorld) override
 
- ULevelPlayerPlacer(으)로부터 상속된 Public 멤버 함수
 ULevelPlayerPlacer ()
 

상세한 설명

월드에서 첫 번째 APlayerStart를 탐색하여 플레이어를 배치합니다. PlayerStart가 없으면 배치를 건너뜁니다.

멤버 함수 문서화

◆ PlacePlayer()

void ULPP_ByPlayerStart::PlacePlayer ( UWorld *  InWorld)
overridevirtual
10{
11 if (InWorld == nullptr)
12 {
13 return;
14 }
15
16 APlayerController* PC = InWorld->GetFirstPlayerController();
17
18 if (PC == nullptr)
19 {
20 return;
21 }
22
23 APawn* Pawn = PC->GetPawn();
24
25 if (Pawn == nullptr)
26 {
27 return;
28 }
29
30 TArray<AActor*> PlayerStarts;
31
32 UGameplayStatics::GetAllActorsOfClass(InWorld, APlayerStart::StaticClass(), PlayerStarts);
33
34 if (PlayerStarts.IsEmpty())
35 {
36 return;
37 }
38
39 const AActor* StartActor = PlayerStarts[0];
40 const FVector Location = StartActor->GetActorLocation();
41 const FRotator Rotation = StartActor->GetActorRotation();
42
43 Pawn->SetActorLocationAndRotation(Location, Rotation, false, nullptr, ETeleportType::TeleportPhysics);
44}

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