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

#include <HpBarUserWidget.h>

UHpBarUserWidget에 대한 상속 다이어그램 :
Inheritance graph
UHpBarUserWidget에 대한 협력 다이어그램:
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 NativeDestruct () override
 
virtual void OnHealthChanged (const FOnAttributeChangeData &ChangeData)
 
virtual void OnMaxHealthChanged (const FOnAttributeChangeData &ChangeData)
 
virtual void UpdateHpBar ()
 
- UUserWidgetBase(으)로부터 상속된 Protected 멤버 함수
virtual void OnWidgetStateChanged (EWidgetState InState)
 
virtual void NativeConstruct () override
 
virtual void OnWidgetActivated ()
 
virtual void OnWidgetDeactivated ()
 
void OnPushedToLayer_Internal ()
 
void OnPoppedFromLayer_Internal ()
 
void OnActivated_Internal ()
 
void OnDeactivated_Internal ()
 

Protected 속성

TObjectPtr< UProgressBar > HealthProgressBar
 
float CurrentHealth = 0.0f
 
float CurrentMaxHealth = 1.0f
 
- UUserWidgetBase(으)로부터 상속된 Protected 속성
TSubclassOf< UUserPresenterBase > PresenterClass
 
EWidgetState WidgetState
 
TObjectPtr< UAbilitySystemComponent > ASC
 
FGameplayTag LayerTag
 
bool bPrimary = false
 
TObjectPtr< UWidgetAnimation > AppearanceAnim
 
TObjectPtr< UWidgetAnimation > DisappearanceAnim
 

Private 속성

FDelegateHandle HealthChangedDelegateHandle
 
FDelegateHandle MaxHealthChangedDelegateHandle
 

멤버 함수 문서화

◆ NativeDestruct()

void UHpBarUserWidget::NativeDestruct ( )
overrideprotectedvirtual

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

UDelayedHpBarWidget, UEnemyHpBarWidget에서 재구현되었습니다.

53{
54 if (ASC)
55 {
56 ASC->GetGameplayAttributeValueChangeDelegate(UBaseAttributeSet::GetHealthAttribute()).Remove(HealthChangedDelegateHandle);
57 ASC->GetGameplayAttributeValueChangeDelegate(UBaseAttributeSet::GetMaxHealthAttribute()).Remove(MaxHealthChangedDelegateHandle);
58 }
59
60 Super::NativeDestruct();
61}
FDelegateHandle HealthChangedDelegateHandle
Definition HpBarUserWidget.h:39
FDelegateHandle MaxHealthChangedDelegateHandle
Definition HpBarUserWidget.h:40
TObjectPtr< UAbilitySystemComponent > ASC
Definition UserWidgetBase.h:167

다음을 참조함 : UUserWidgetBase::ASC, HealthChangedDelegateHandle, MaxHealthChangedDelegateHandle.

◆ OnHealthChanged()

void UHpBarUserWidget::OnHealthChanged ( const FOnAttributeChangeData &  ChangeData)
protectedvirtual
64{
65 CurrentHealth = ChangeData.NewValue;
67}
float CurrentHealth
Definition HpBarUserWidget.h:35
virtual void UpdateHpBar()
Definition HpBarUserWidget.cpp:75

다음을 참조함 : CurrentHealth, UpdateHpBar().

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

◆ OnMaxHealthChanged()

void UHpBarUserWidget::OnMaxHealthChanged ( const FOnAttributeChangeData &  ChangeData)
protectedvirtual
70{
71 CurrentMaxHealth = ChangeData.NewValue;
73}
float CurrentMaxHealth
Definition HpBarUserWidget.h:36

다음을 참조함 : CurrentMaxHealth, UpdateHpBar().

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

◆ SetAbilitySystemComponent()

void UHpBarUserWidget::SetAbilitySystemComponent ( AActor *  InOwner)
overridevirtual

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

UDelayedHpBarWidget, UEnemyHpBarWidget에서 재구현되었습니다.

13{
14 Super::SetAbilitySystemComponent(InOwner);
15
16 if (!ASC)
17 {
18 LOG_ERROR(LogCK, "Failed to get ASC");
19 return;
20 }
21
22 if (HealthChangedDelegateHandle.IsValid())
23 {
24 ASC->GetGameplayAttributeValueChangeDelegate(UBaseAttributeSet::GetHealthAttribute()).Remove(HealthChangedDelegateHandle);
25 }
27 {
28 ASC->GetGameplayAttributeValueChangeDelegate(UBaseAttributeSet::GetMaxHealthAttribute()).Remove(MaxHealthChangedDelegateHandle);
29 }
30
31 HealthChangedDelegateHandle = ASC->GetGameplayAttributeValueChangeDelegate(UBaseAttributeSet::GetHealthAttribute()).AddUObject(this, &ThisClass::OnHealthChanged);
32 MaxHealthChangedDelegateHandle = ASC->GetGameplayAttributeValueChangeDelegate(UBaseAttributeSet::GetMaxHealthAttribute()).AddUObject(this, &ThisClass::OnMaxHealthChanged);
33
34
35 if (const UBaseAttributeSet* CurrentAttributeSet = ASC->GetSet<UBaseAttributeSet>())
36 {
37 CurrentHealth = CurrentAttributeSet->GetHealth();
38 CurrentMaxHealth = CurrentAttributeSet->GetMaxHealth();
40 return;
41 }
42
43 const UWorld* World = GetWorld();
44
45 if (World && World->IsGameWorld() && World->HasBegunPlay())
46 {
47 LOG_ERROR(LogCK, "Failed to get attribute set");
48 }
49}
#define LOG_ERROR(Category, Format,...)
Definition CK_UE.h:41
Definition BaseAttributeSet.h:58

다음을 참조함 : UUserWidgetBase::ASC, CurrentHealth, CurrentMaxHealth, HealthChangedDelegateHandle, LOG_ERROR, MaxHealthChangedDelegateHandle, UpdateHpBar().

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

◆ UpdateHpBar()

void UHpBarUserWidget::UpdateHpBar ( )
protectedvirtual

UDelayedHpBarWidget에서 재구현되었습니다.

76{
78 {
79 LOG_ERROR(LogCK, "Failed to get health progress bar");
80 return;
81 }
82
83 const float Percent = (CurrentMaxHealth > 0.0f) ? (CurrentHealth / CurrentMaxHealth) : 0.0f;
84 HealthProgressBar->SetPercent(Percent);
85}
TObjectPtr< UProgressBar > HealthProgressBar
Definition HpBarUserWidget.h:33

다음을 참조함 : CurrentHealth, CurrentMaxHealth, HealthProgressBar, LOG_ERROR.

다음에 의해서 참조됨 : OnHealthChanged(), OnMaxHealthChanged(), SetAbilitySystemComponent().

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

멤버 데이터 문서화

◆ CurrentHealth

float UHpBarUserWidget::CurrentHealth = 0.0f
protected

◆ CurrentMaxHealth

float UHpBarUserWidget::CurrentMaxHealth = 1.0f
protected

◆ HealthChangedDelegateHandle

FDelegateHandle UHpBarUserWidget::HealthChangedDelegateHandle
private

다음에 의해서 참조됨 : NativeDestruct(), SetAbilitySystemComponent().

◆ HealthProgressBar

TObjectPtr<UProgressBar> UHpBarUserWidget::HealthProgressBar
protected

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

◆ MaxHealthChangedDelegateHandle

FDelegateHandle UHpBarUserWidget::MaxHealthChangedDelegateHandle
private

다음에 의해서 참조됨 : NativeDestruct(), SetAbilitySystemComponent().


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