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

#include <PlayerSkillHUDWidget.h>

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

Public 멤버 함수

virtual void SetAbilitySystemComponent (AActor *InOwner) override
 
- UUserWidgetBase(으)로부터 상속된 Public 멤버 함수
UUserPresenterBase * RequestPresenter ()
 
UUserPresenterBase * FindPresenter () const
 
void ReleasePresenter ()
 
virtual void BindPresenter_Implementation (UObject *Presenter) override
 
virtual void UnbindPresenter_Implementation (UObject *Presenter) override
 
virtual void ResetAbilitySystemComponent (AActor *InOwner)
 
virtual UAbilitySystemComponent * GetAbilitySystemComponent () const override
 
virtual void OnPushedToLayer ()
 
virtual void OnPoppedFromLayer ()
 
virtual void OnActivated ()
 
virtual void OnDeactivated ()
 
void Activate ()
 
void Deactivate ()
 
bool CanBePushedToLayer () const
 
FORCEINLINE UWaitForWidgetActivation * GetActivationHandle ()
 
FORCEINLINE TSubclassOf< UUserPresenterBase > GetWidgetPresenterClass () const
 
FORCEINLINE FGameplayTag GetLayerTag () const
 
FORCEINLINE void SetLayerTag (const FGameplayTag InTag)
 
FORCEINLINE bool IsPrimary () const
 
FORCEINLINE void SetPrimary (const bool InPrimary)
 
FORCEINLINE EWidgetState GetWidgetState () const
 
FORCEINLINE void SetWidgetState (const EWidgetState InState)
 
FORCEINLINE bool HasAppearanceAnim () const
 
FORCEINLINE bool HasDisappearanceAnim () const
 
- IWidgetViewInterface(으)로부터 상속된 Public 멤버 함수
void BindPresenter (UObject *Presenter)
 
void UnbindPresenter (UObject *Presenter)
 

Protected 멤버 함수

virtual void NativeConstruct () override
 
virtual void NativeDestruct () override
 
virtual void NativeOnInitialized () override
 
- UUserWidgetBase(으)로부터 상속된 Protected 멤버 함수
virtual void OnWidgetStateChanged (EWidgetState InState)
 
virtual void OnWidgetActivated ()
 
virtual void OnWidgetDeactivated ()
 
void OnPushedToLayer_Internal ()
 
void OnPoppedFromLayer_Internal ()
 
void OnActivated_Internal ()
 
void OnDeactivated_Internal ()
 

Protected 속성

TObjectPtr< USkillSlotWidget > SkillSlot_RMB
 
TObjectPtr< USkillSlotWidget > SkillSlot_LMB
 
TObjectPtr< USkillSlotWidget > SkillSlot_Space
 
TObjectPtr< USkillSlotWidget > SkillSlot_Key1
 
TObjectPtr< USkillSlotWidget > SkillSlot_Key2
 
TObjectPtr< USkillSlotWidget > SkillSlot_Key3
 
- UUserWidgetBase(으)로부터 상속된 Protected 속성
TSubclassOf< UUserPresenterBase > PresenterClass
 
EWidgetState WidgetState
 
TObjectPtr< UAbilitySystemComponent > ASC
 
FGameplayTag LayerTag
 
bool bPrimary = false
 
TObjectPtr< UWidgetAnimation > AppearanceAnim
 
TObjectPtr< UWidgetAnimation > DisappearanceAnim
 

Private 멤버 함수

void UpdateWeaponActionSlots (FGameplayTag PreviousWeaponTag, FGameplayTag NewWeaponTag)
 

Private 속성

TArray< TObjectPtr< UWeaponBasedSkillSlotWidget > > WeaponBasedSkillSlots
 

상세한 설명

무기 변경을 구독하고 보유한 무기 액션 슬롯의 아이콘을 갱신합니다.

멤버 함수 문서화

◆ NativeConstruct()

void UPlayerSkillHUDWidget::NativeConstruct ( )
overrideprotectedvirtual

무기 변경 이벤트를 등록하고 현재 무기 태그를 슬롯에 전달합니다.

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

15{
16 Super::NativeConstruct();
17
18 UPlayerManagementSubsystem* PlayerSubsystem = ULocalPlayer::GetSubsystem<UPlayerManagementSubsystem>(GetOwningLocalPlayer());
19
20 if (PlayerSubsystem == nullptr)
21 {
22 return;
23 }
24
25 PlayerSubsystem->WeaponChangedDelegate.AddUniqueDynamic(this, &ThisClass::UpdateWeaponActionSlots);
26}
Definition PlayerManagementSubsystem.h:42
FPlayerWeaponChangedDelegate WeaponChangedDelegate
Definition PlayerManagementSubsystem.h:137

다음을 참조함 : UPlayerManagementSubsystem::WeaponChangedDelegate.

◆ NativeDestruct()

void UPlayerSkillHUDWidget::NativeDestruct ( )
overrideprotectedvirtual

위젯 제거 시 무기 변경 이벤트 등록을 해제합니다.

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

30{
31 if (UPlayerManagementSubsystem* PlayerSubsystem = ULocalPlayer::GetSubsystem<UPlayerManagementSubsystem>(GetOwningLocalPlayer()))
32 {
33 PlayerSubsystem->WeaponChangedDelegate.RemoveDynamic(this, &ThisClass::UpdateWeaponActionSlots);
34 }
35
36 Super::NativeDestruct();
37}

◆ NativeOnInitialized()

void UPlayerSkillHUDWidget::NativeOnInitialized ( )
overrideprotectedvirtual

WeaponBasedSkillSlot 위젯들 수집

41{
42 Super::NativeOnInitialized();
43
44 TArray SkillSlots =
45 {
52 };
53
54 for (USkillSlotWidget* SkillSlot : SkillSlots)
55 {
56 if (UWeaponBasedSkillSlotWidget* WeaponBasedSlot = Cast<UWeaponBasedSkillSlotWidget>(SkillSlot))
57 {
58 WeaponBasedSkillSlots.Add(WeaponBasedSlot);
59 }
60 }
61}
TObjectPtr< USkillSlotWidget > SkillSlot_Key1
Definition PlayerSkillHUDWidget.h:48
TObjectPtr< USkillSlotWidget > SkillSlot_Key3
Definition PlayerSkillHUDWidget.h:54
TObjectPtr< USkillSlotWidget > SkillSlot_Key2
Definition PlayerSkillHUDWidget.h:51
TObjectPtr< USkillSlotWidget > SkillSlot_Space
Definition PlayerSkillHUDWidget.h:45
TObjectPtr< USkillSlotWidget > SkillSlot_LMB
Definition PlayerSkillHUDWidget.h:42
TArray< TObjectPtr< UWeaponBasedSkillSlotWidget > > WeaponBasedSkillSlots
Definition PlayerSkillHUDWidget.h:58
TObjectPtr< USkillSlotWidget > SkillSlot_RMB
Definition PlayerSkillHUDWidget.h:39
Definition SkillSlotWidget.h:35
Definition WeaponBasedSkillSlotWidget.h:13

다음을 참조함 : SkillSlot_Key1, SkillSlot_Key2, SkillSlot_Key3, SkillSlot_LMB, SkillSlot_RMB, SkillSlot_Space, WeaponBasedSkillSlots.

◆ SetAbilitySystemComponent()

void UPlayerSkillHUDWidget::SetAbilitySystemComponent ( AActor *  InOwner)
overridevirtual

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

74{
75 Super::SetAbilitySystemComponent(InOwner);
76
77 if (InOwner == nullptr)
78 {
79 return;
80 }
81
82 UPlayerManagementSubsystem* PlayerSubsystem = ULocalPlayer::GetSubsystem<UPlayerManagementSubsystem>(GetOwningLocalPlayer());
83 FGameplayTag CurrentWeaponTag = PlayerSubsystem ? PlayerSubsystem->GetCurrentWeaponTag() : FGameplayTag::EmptyTag;
84
85 if (PlayerSubsystem == nullptr)
86 {
87 LOG_WARNING(LogCK, "%s가 존재하지 않아 무기 태그가 %s로 설정됩니다. ", NAMEOF(UPlayerManagementSubsystem), *CurrentWeaponTag.ToString());
88 }
89
90 Algo::NullSafeForEach(WeaponBasedSkillSlots, [InOwner, CurrentWeaponTag](UWeaponBasedSkillSlotWidget* SkillSlot)
91 {
92 SkillSlot->SetAbilitySystemComponent(InOwner);
93 SkillSlot->UpdateWeaponIcon(CurrentWeaponTag);
94 });
95}
#define NAMEOF(Type)
Definition CK_UE.h:31
#define LOG_WARNING(Category, Format,...)
Definition CK_UE.h:40
FORCEINLINE FGameplayTag GetCurrentWeaponTag() const
Definition PlayerManagementSubsystem.h:95
virtual void SetAbilitySystemComponent(AActor *InOwner) override
Definition SkillSlotWidget.cpp:16
void UpdateWeaponIcon(FGameplayTag WeaponTag)
Definition WeaponBasedSkillSlotWidget.cpp:9

다음을 참조함 : UPlayerManagementSubsystem::GetCurrentWeaponTag(), LOG_WARNING, NAMEOF, USkillSlotWidget::SetAbilitySystemComponent(), UWeaponBasedSkillSlotWidget::UpdateWeaponIcon(), WeaponBasedSkillSlots.

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

◆ UpdateWeaponActionSlots()

void UPlayerSkillHUDWidget::UpdateWeaponActionSlots ( FGameplayTag  PreviousWeaponTag,
FGameplayTag  NewWeaponTag 
)
private

무기 액션 슬롯의 아이콘을 갱신하며, 빈 태그도 그대로 전달합니다.

65{
67 {
68 SkillSlot->UpdateWeaponIcon(WeaponTag);
69 }
70}

다음을 참조함 : WeaponBasedSkillSlots.

멤버 데이터 문서화

◆ SkillSlot_Key1

TObjectPtr<USkillSlotWidget> UPlayerSkillHUDWidget::SkillSlot_Key1
protected

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

◆ SkillSlot_Key2

TObjectPtr<USkillSlotWidget> UPlayerSkillHUDWidget::SkillSlot_Key2
protected

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

◆ SkillSlot_Key3

TObjectPtr<USkillSlotWidget> UPlayerSkillHUDWidget::SkillSlot_Key3
protected

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

◆ SkillSlot_LMB

TObjectPtr<USkillSlotWidget> UPlayerSkillHUDWidget::SkillSlot_LMB
protected

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

◆ SkillSlot_RMB

TObjectPtr<USkillSlotWidget> UPlayerSkillHUDWidget::SkillSlot_RMB
protected

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

◆ SkillSlot_Space

TObjectPtr<USkillSlotWidget> UPlayerSkillHUDWidget::SkillSlot_Space
protected

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

◆ WeaponBasedSkillSlots

TArray<TObjectPtr<UWeaponBasedSkillSlotWidget> > UPlayerSkillHUDWidget::WeaponBasedSkillSlots
private

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