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

#include <NPCExaminer.h>

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

Public 멤버 함수

 ANPCExaminer ()
 
FString GetCurrentQuestion () const
 현재 질문 가져오기
 
void SetSpeakStage (class ASpeakStageActor *InSpeakStage)
 SpeakStage 설정 (GameMode에서 호출)
 
virtual void SetupPlayerInputComponent (class UInputComponent *PlayerInputComponent) override
 
virtual void Tick (float DeltaTime) override
 

Protected 멤버 함수

virtual void BeginPlay () override
 
void ChangeEyeColor ()
 
void OnSphereBeginOverlap (UPrimitiveComponent *OverlappedComponent, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult)
 
void OnSphereEndOverlap (UPrimitiveComponent *OverlappedComponent, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex)
 

Protected 속성

bool bIsPlayerNear
 
TObjectPtr< class AOwlPlayerDetectedPlayer
 
TObjectPtr< class UMaterialInstanceDynamic > DynamicMaterial2
 
FLinearColor EyeColor = FLinearColor::Red
 
FName EyeColorName = FName("EmissiveColor2")
 
TObjectPtr< class UMaterialInterface > Material2
 
TObjectPtr< class USphereComponent > PlayerDetectSphereComp
 
TObjectPtr< class ASpeakStageActorSpeakStage
 연결된 SpeakStage
 

상세한 설명

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

생성자 & 소멸자 문서화

◆ ANPCExaminer()

ANPCExaminer::ANPCExaminer ( )

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

15{
16 // Set this character to call Tick() every frame. You can turn this off to improve performance if you don't need it.
17 PrimaryActorTick.bCanEverTick = true;
18
19 ConstructorHelpers::FObjectFinder<UMaterialInterface> materialRef(TEXT("/Script/Engine.MaterialInstanceConstant'/Game/CustomContents/Character/Asset/Robot14/Materials/MI_Robot14_2_Inst4_NowUsing.MI_Robot14_2_Inst4_NowUsing'"));
20 if (materialRef.Succeeded())
21 {
22 Material2 = materialRef.Object;
23 }
24
25 PlayerDetectSphereComp = CreateDefaultSubobject<USphereComponent>(TEXT("PlayerDetectSphereComp"));
26 PlayerDetectSphereComp->SetupAttachment(GetRootComponent());
27 PlayerDetectSphereComp->SetSphereRadius(200.f);
28}
TObjectPtr< class USphereComponent > PlayerDetectSphereComp
Definition NPCExaminer.h:54
TObjectPtr< class UMaterialInterface > Material2
Definition NPCExaminer.h:32

다음을 참조함 : Material2, PlayerDetectSphereComp.

멤버 함수 문서화

◆ BeginPlay()

void ANPCExaminer::BeginPlay ( )
overrideprotectedvirtual

ANPCBase(으)로부터 재구현되었습니다.

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

32{
33 Super::BeginPlay();
34
35 // Set Dynamic Material
36 DynamicMaterial2 = UMaterialInstanceDynamic::Create(Material2, this);
37 GetMesh()->SetMaterial(0, DynamicMaterial2);
38
39 // Bind Overlap Event
40 PlayerDetectSphereComp->OnComponentBeginOverlap.AddDynamic(this, &ANPCExaminer::OnSphereBeginOverlap);
41 PlayerDetectSphereComp->OnComponentEndOverlap.AddDynamic(this, &ANPCExaminer::OnSphereEndOverlap);
42}
void OnSphereEndOverlap(UPrimitiveComponent *OverlappedComponent, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex)
TObjectPtr< class UMaterialInstanceDynamic > DynamicMaterial2
Definition NPCExaminer.h:35
void OnSphereBeginOverlap(UPrimitiveComponent *OverlappedComponent, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult)

다음을 참조함 : DynamicMaterial2, Material2, OnSphereBeginOverlap(), OnSphereEndOverlap(), PlayerDetectSphereComp.

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

◆ ChangeEyeColor()

void ANPCExaminer::ChangeEyeColor ( )
protected

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

57{
59 {
60 UE_LOG(LogTemp, Warning, TEXT("Fail to ChangeEyeColor because DynamicMaterial2 is Null!!!"));
61 return;
62 }
63
64 DynamicMaterial2->SetVectorParameterValue(EyeColorName, EyeColor);
65}
FName EyeColorName
Definition NPCExaminer.h:38
FLinearColor EyeColor
Definition NPCExaminer.h:39

다음을 참조함 : DynamicMaterial2, EyeColor, EyeColorName.

◆ GetCurrentQuestion()

FString ANPCExaminer::GetCurrentQuestion ( ) const

현재 질문 가져오기

반환값
현재 단계의 질문 문자열

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

90{
91 if (SpeakStage)
92 {
93 return SpeakStage->GetCurrentQuestion();
94 }
95
96 return TEXT("");
97}
TObjectPtr< class ASpeakStageActor > SpeakStage
연결된 SpeakStage
Definition NPCExaminer.h:70

다음을 참조함 : ASpeakStageActor::GetCurrentQuestion(), SpeakStage.

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

◆ OnSphereBeginOverlap()

void ANPCExaminer::OnSphereBeginOverlap ( UPrimitiveComponent *  OverlappedComponent,
AActor *  OtherActor,
UPrimitiveComponent *  OtherComp,
int32  OtherBodyIndex,
bool  bFromSweep,
const FHitResult &  SweepResult 
)
protected

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

68{
69 bIsPlayerNear = true;
70 DetectedPlayer = Cast<AOwlPlayer>(OtherActor);
71}
bool bIsPlayerNear
Definition NPCExaminer.h:50
TObjectPtr< class AOwlPlayer > DetectedPlayer
Definition NPCExaminer.h:47

다음을 참조함 : bIsPlayerNear, DetectedPlayer.

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

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

◆ OnSphereEndOverlap()

void ANPCExaminer::OnSphereEndOverlap ( UPrimitiveComponent *  OverlappedComponent,
AActor *  OtherActor,
UPrimitiveComponent *  OtherComp,
int32  OtherBodyIndex 
)
protected

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

74{
75 bIsPlayerNear = false;
76 DetectedPlayer = nullptr;
77}

다음을 참조함 : bIsPlayerNear, DetectedPlayer.

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

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

◆ SetSpeakStage()

void ANPCExaminer::SetSpeakStage ( class ASpeakStageActor InSpeakStage)

SpeakStage 설정 (GameMode에서 호출)

매개변수
InSpeakStage연결할 SpeakStageActor

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

84{
85 SpeakStage = InSpeakStage;
86 PRINTLOG(TEXT("[NPCExaminer] SpeakStage Connected: %s"), SpeakStage ? TEXT("Success") : TEXT("Failed"));
87}
#define PRINTLOG(fmt,...)
Definition GameLogging.h:30

다음을 참조함 : PRINTLOG, SpeakStage.

◆ SetupPlayerInputComponent()

void ANPCExaminer::SetupPlayerInputComponent ( class UInputComponent *  PlayerInputComponent)
overridevirtual

ANPCBase(으)로부터 재구현되었습니다.

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

52{
53 Super::SetupPlayerInputComponent(PlayerInputComponent);
54}

◆ Tick()

void ANPCExaminer::Tick ( float  DeltaTime)
overridevirtual

ANPCBase(으)로부터 재구현되었습니다.

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

46{
47 Super::Tick(DeltaTime);
48}

멤버 데이터 문서화

◆ bIsPlayerNear

bool ANPCExaminer::bIsPlayerNear
protected

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

다음에 의해서 참조됨 : OnSphereBeginOverlap(), OnSphereEndOverlap().

◆ DetectedPlayer

TObjectPtr<class AOwlPlayer> ANPCExaminer::DetectedPlayer
protected

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

다음에 의해서 참조됨 : OnSphereBeginOverlap(), OnSphereEndOverlap().

◆ DynamicMaterial2

TObjectPtr<class UMaterialInstanceDynamic> ANPCExaminer::DynamicMaterial2
protected

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

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

◆ EyeColor

FLinearColor ANPCExaminer::EyeColor = FLinearColor::Red
protected

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

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

◆ EyeColorName

FName ANPCExaminer::EyeColorName = FName("EmissiveColor2")
protected

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

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

◆ Material2

TObjectPtr<class UMaterialInterface> ANPCExaminer::Material2
protected

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

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

◆ PlayerDetectSphereComp

TObjectPtr<class USphereComponent> ANPCExaminer::PlayerDetectSphereComp
protected

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

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

◆ SpeakStage

TObjectPtr<class ASpeakStageActor> ANPCExaminer::SpeakStage
protected

연결된 SpeakStage

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

다음에 의해서 참조됨 : GetCurrentQuestion(), SetSpeakStage().


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