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

#include <SectionGate.h>

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

Public 멤버 함수

 ASectionGate ()
 
void SetGateState (const EGateOperation Operation)
 
void ApplyGateState (EGateState NewState, bool bForce=false)
 
FORCEINLINE EGateState GetGateState () const
 
FORCEINLINE bool IsLocked () const
 
virtual UStageEventListenerComponent * GetEventListenerComponent () const
 
- IStageEventBehaviorInterface(으)로부터 상속된 Public 멤버 함수
void HandleStageEvent (const FStageEventMessage &Message, const FInstancedStruct &ListenerContext)
 
bool ShouldReceiveStageEvent (const FStageEventMessage &Message, const FInstancedStruct &ListenerContext)
 
virtual void HandleStageEvent_Implementation (const FStageEventMessage &Message, const FInstancedStruct &ListenerContext)
 
virtual bool ShouldReceiveStageEvent_Implementation (const FStageEventMessage &Message, const FInstancedStruct &ListenerContext)
 

Protected 멤버 함수

virtual void BeginPlay () override
 

Protected 속성

TObjectPtr< UStageEventListenerComponent > EventListenerComponent
 
TObjectPtr< UStageEventSenderComponent > StateChangedEventSender
 
TObjectPtr< UBoxComponent > BoxComponent
 
EGateState InitialGateState = EGateState::Unlocked
 

Private 속성

EGateState CurrentState = EGateState::Unlocked
 

생성자 & 소멸자 문서화

◆ ASectionGate()

ASectionGate::ASectionGate ( )
16{
17 PrimaryActorTick.bCanEverTick = false;
18
19 BoxComponent = CreateDefaultSubobject<UBoxComponent>(TEXT("BoxComponent"));
20 EventListenerComponent = CreateDefaultSubobject<UStageEventListenerComponent>(TEXT("EventListenerComponent"));
21 StateChangedEventSender = CreateDefaultSubobject<UStageEventSenderComponent>(TEXT("StateChangedEventSender"));
22}
TObjectPtr< UStageEventListenerComponent > EventListenerComponent
Definition SectionGate.h:63
TObjectPtr< UStageEventSenderComponent > StateChangedEventSender
Definition SectionGate.h:66
TObjectPtr< UBoxComponent > BoxComponent
Definition SectionGate.h:69

다음을 참조함 : BoxComponent, EventListenerComponent, StateChangedEventSender.

멤버 함수 문서화

◆ ApplyGateState()

void ASectionGate::ApplyGateState ( EGateState  NewState,
bool  bForce = false 
)
77{
78 if (bForce == false && CurrentState == NewState)
79 {
80 return;
81 }
82
83 CurrentState = NewState;
84 const bool bLocked = (CurrentState == EGateState::Locked);
85
86 SetActorEnableCollision(bLocked);
87 SetActorHiddenInGame(!bLocked);
88 check(BoxComponent);
89
90 BoxComponent->SetCollisionEnabled(bLocked ? ECollisionEnabled::QueryAndPhysics : ECollisionEnabled::NoCollision);
91 BoxComponent->SetCollisionResponseToAllChannels(bLocked ? ECR_Block : ECR_Ignore);
92 BoxComponent->SetGenerateOverlapEvents(bLocked);
93
94 // 초기 상태 강제 적용은 변경 이벤트로 알리지 않는다.
95 if (bForce || !StateChangedEventSender)
96 {
97 return;
98 }
99
100 StateChangedEventSender->Send(nullptr);
101}
EGateState CurrentState
Definition SectionGate.h:76

다음을 참조함 : BoxComponent, CurrentState, Locked, StateChangedEventSender.

다음에 의해서 참조됨 : BeginPlay(), USectionGateStateCommand::Process(), SetGateState(), USectionGateStateCommand::Undo().

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

◆ BeginPlay()

void ASectionGate::BeginPlay ( )
overrideprotectedvirtual
26{
27 Super::BeginPlay();
29}
EGateState InitialGateState
Definition SectionGate.h:72
void ApplyGateState(EGateState NewState, bool bForce=false)
Definition SectionGate.cpp:76

다음을 참조함 : ApplyGateState(), InitialGateState.

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

◆ GetEventListenerComponent()

virtual UStageEventListenerComponent * ASectionGate::GetEventListenerComponent ( ) const
inlinevirtual
54 {
56 }

◆ GetGateState()

FORCEINLINE EGateState ASectionGate::GetGateState ( ) const
inline
42 {
43 return CurrentState;
44 }

◆ IsLocked()

FORCEINLINE bool ASectionGate::IsLocked ( ) const
inline
48 {
50 }

다음을 참조함 : Locked.

◆ SetGateState()

void ASectionGate::SetGateState ( const EGateOperation  Operation)
33{
34 EGateState Target = CurrentState;
35
36 switch (Operation)
37 {
39 {
41 break;
42 }
43
45 {
46 Target = EGateState::Unlocked;
47 break;
48 }
49
51 {
52 Target = EGateState::Locked;
53 break;
54 }
55 }
56
57 if (CurrentState == Target)
58 {
59 return;
60 }
61
62 auto Lambda = [this, Target](USectionGateStateCommand* Command)
63 {
64 Command->Initialize(this, CurrentState, Target);
65 };
66
67 if (USnapshotSubsystem::ProcessNewCommand<USectionGateStateCommand>(this, Lambda))
68 {
69 return;
70 }
71
72 ApplyGateState(Target);
73}
EGateState
Definition SectionGate.h:19
Definition SectionGateStateCommand.h:12

다음을 참조함 : ApplyGateState(), CurrentState, Lock, Locked, Toggle, Unlock, Unlocked.

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

멤버 데이터 문서화

◆ BoxComponent

TObjectPtr<UBoxComponent> ASectionGate::BoxComponent
protected

다음에 의해서 참조됨 : ApplyGateState(), ASectionGate().

◆ CurrentState

EGateState ASectionGate::CurrentState = EGateState::Unlocked
private

다음에 의해서 참조됨 : ApplyGateState(), SetGateState().

◆ EventListenerComponent

TObjectPtr<UStageEventListenerComponent> ASectionGate::EventListenerComponent
protected

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

◆ InitialGateState

EGateState ASectionGate::InitialGateState = EGateState::Unlocked
protected

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

◆ StateChangedEventSender

TObjectPtr<UStageEventSenderComponent> ASectionGate::StateChangedEventSender
protected

다음에 의해서 참조됨 : ApplyGateState(), ASectionGate().


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