#include <InteractionChannel.h>
◆ Close()
| void UInteractionChannel::Close |
( |
| ) |
|
86{
88 {
89 return;
90 }
91
93
95 {
96 if (Interactable.IsValid() && Interactable->GetActiveChannel() == this)
97 {
98 Interactable->UnregisterFromChannel();
99 }
100 }
101
107}
TWeakObjectPtr< ACharacterBase > Requester
Definition InteractionChannel.h:65
bool bIsClosed
Definition InteractionChannel.h:63
FOnInteractionChannelEmpty OnChannelEmpty
Definition InteractionChannel.h:60
FOnInteractionDelegate OnInteractableRegistered
Definition InteractionChannel.h:54
TArray< TWeakObjectPtr< UInteractabilityComponent > > RegisteredInteractables
Definition InteractionChannel.h:66
FOnInteractionDelegate OnInteractableUnregistered
Definition InteractionChannel.h:57
◆ CreateChannel()
13{
15 check(Channel);
16
17 AActor* ThisActor = Cast<AActor>(InteractabilityCompo->GetOwner());
18 checkf(ThisActor, TEXT(
"%s의 Owner를 %s로 형변환할 수 없습니다. "),
NAMEOF(UInteractabilityComponent),
NAMEOF(AActor));
19
21
22 FScriptDelegate OnRegisteredDelegate;
23 FScriptDelegate OnUnregisteredDelegate;
24
25 OnRegisteredDelegate.BindUFunction(ThisActor, GET_FUNCTION_NAME_CHECKED(
IInteractableInterface, OnBeginInteraction));
26 OnUnregisteredDelegate.BindUFunction(ThisActor, GET_FUNCTION_NAME_CHECKED(
IInteractableInterface, OnEndInteraction));
27
30
31 InteractabilityCompo->RegisterToChannel(Channel);
32 return Channel;
33}
#define NAMEOF(Type)
Definition CK_UE.h:30
Definition InteractableInterface.h:23
Definition InteractionChannel.h:21
void Initialize(ACharacterBase *InRequester)
Definition InteractionChannel.cpp:36
◆ GetRequester()
| FORCEINLINE ACharacterBase * UInteractionChannel::GetRequester |
( |
| ) |
const |
|
inline |
◆ Initialize()
◆ IsClosed()
| FORCEINLINE bool UInteractionChannel::IsClosed |
( |
| ) |
const |
|
inline |
◆ IsEmpty()
| FORCEINLINE bool UInteractionChannel::IsEmpty |
( |
| ) |
const |
|
inline |
◆ RegisterInteractable()
| void UInteractionChannel::RegisterInteractable |
( |
UInteractabilityComponent * |
Interactable | ) |
|
43{
45 {
46 return;
47 }
48
50
52 {
53 return;
54 }
55
58}
void RemoveInvalidInteractableActors()
Definition InteractionChannel.cpp:110
◆ RemoveInvalidInteractableActors()
| void UInteractionChannel::RemoveInvalidInteractableActors |
( |
| ) |
|
|
private |
111{
113 {
114 return Interactable.IsValid() == false;
115 });
116}
◆ UnregisterInteractable()
| void UInteractionChannel::UnregisterInteractable |
( |
UInteractabilityComponent * |
Interactable | ) |
|
62{
63 if (!ensureAlwaysMsgf(Interactable, TEXT(
"%s is nullptr"),
NAMEOF(Interactable)))
64 {
65 return;
66 }
67
69 {
71 return;
72 }
73
76
78 {
81 }
82}
void Close()
Definition InteractionChannel.cpp:85
FORCEINLINE bool IsEmpty() const
Definition InteractionChannel.h:42
◆ bIsClosed
| bool UInteractionChannel::bIsClosed = false |
|
private |
◆ OnChannelEmpty
| FOnInteractionChannelEmpty UInteractionChannel::OnChannelEmpty |
◆ OnInteractableRegistered
| FOnInteractionDelegate UInteractionChannel::OnInteractableRegistered |
◆ OnInteractableUnregistered
| FOnInteractionDelegate UInteractionChannel::OnInteractableUnregistered |
◆ RegisteredInteractables
| TArray<TWeakObjectPtr<UInteractabilityComponent> > UInteractionChannel::RegisteredInteractables |
|
private |
◆ Requester
이 클래스에 대한 문서화 페이지는 다음의 파일들로부터 생성되었습니다.: