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

#include <LPP_ByTaggedPlayerStart.h>

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

Public 멤버 함수

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

Public 속성

FName TargetTag = NAME_None
 

상세한 설명

지정한 태그를 가진 APlayerStart를 탐색하여 플레이어를 배치합니다. 여러 스폰 포인트가 있는 레벨(보스방, 안전지대 등)에서 명시적으로 원하는 지점을 지정할 때 유용합니다. 일치하는 태그가 없으면 배치를 건너뜁니다.

멤버 함수 문서화

◆ PlacePlayer()

void ULPP_ByTaggedPlayerStart::PlacePlayer ( UWorld *  InWorld)
overridevirtual
10{
11 if (InWorld == nullptr)
12 {
13 return;
14 }
15
16 const 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 UGameplayStatics::GetAllActorsOfClass(InWorld, APlayerStart::StaticClass(), PlayerStarts);
32
33 const AActor* MatchedStart = *Algo::FindByPredicate(PlayerStarts, [this](AActor* Actor)
34 {
35 const APlayerStart* PS = Cast<APlayerStart>(Actor);
36 return PS && PS->PlayerStartTag == TargetTag;
37 });
38
39 if (MatchedStart == nullptr)
40 {
41 return;
42 }
43
44 const FVector Location = MatchedStart->GetActorLocation();
45 const FRotator Rotation = MatchedStart->GetActorRotation();
46
47 Pawn->SetActorLocationAndRotation(Location, Rotation, false, nullptr, ETeleportType::TeleportPhysics);
48}
FName TargetTag
Definition LPP_ByTaggedPlayerStart.h:25

멤버 데이터 문서화

◆ TargetTag

FName ULPP_ByTaggedPlayerStart::TargetTag = NAME_None

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