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

#include <ComboCounterComponent.h>

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

Public 멤버 함수

 UComboCounterComponent ()
 
bool RegisterHit ()
 
void ResetCombo ()
 
int32 GetComboCount () const
 

Protected 멤버 함수

virtual void EndPlay (const EEndPlayReason::Type EndPlayReason) override
 

Protected 속성

float ComboResetDelay = 10.0f
 
FOnComboCountChanged OnComboCountChanged
 
FOnComboReset OnComboReset
 
FTimerHandle ComboResetTimerHandle
 

Private 멤버 함수

UAbilitySystemComponent * GetComboAbilitySystem () const
 

상세한 설명

플레이어 캐릭터에서 타격 콤보와 마지막 타격 이후의 만료 시간을 관리한다.

생성자 & 소멸자 문서화

◆ UComboCounterComponent()

UComboCounterComponent::UComboCounterComponent ( )
10{
11 PrimaryComponentTick.bCanEverTick = false;
12}

멤버 함수 문서화

◆ EndPlay()

void UComboCounterComponent::EndPlay ( const EEndPlayReason::Type  EndPlayReason)
overrideprotectedvirtual
86{
87 ResetCombo();
88
89 Super::EndPlay(EndPlayReason);
90}
void ResetCombo()
Definition ComboCounterComponent.cpp:49

다음을 참조함 : ResetCombo().

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

◆ GetComboAbilitySystem()

UAbilitySystemComponent * UComboCounterComponent::GetComboAbilitySystem ( ) const
private
94{
95 AActor* Owner = GetOwner();
96
97 UAbilitySystemComponent* ASC = UAbilitySystemBlueprintLibrary::GetAbilitySystemComponent(Owner);
98
99 // ASC는 PlayerState에 남는다. 이전 캐릭터의 타이머가 새 캐릭터의 콤보를 변경하지 않게 한다.
100 if (IsValid(ASC) && ASC->GetAvatarActor() == Owner && ASC->GetSet<UPlayerAttributeSet>())
101 {
102 return ASC;
103 }
104 else
105 {
106 return nullptr;
107 }
108}
Definition PlayerAttributeSet.h:10

다음에 의해서 참조됨 : GetComboCount(), RegisterHit(), ResetCombo().

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

◆ GetComboCount()

int32 UComboCounterComponent::GetComboCount ( ) const
73{
74 if (const UAbilitySystemComponent* ASC = GetComboAbilitySystem())
75 {
76 return FMath::RoundToInt(ASC->GetNumericAttribute(UPlayerAttributeSet::GetComboCountAttribute()));
77 }
78 else
79 {
80 return 0;
81 }
82}
UAbilitySystemComponent * GetComboAbilitySystem() const
Definition ComboCounterComponent.cpp:93

다음을 참조함 : GetComboAbilitySystem().

다음에 의해서 참조됨 : RegisterHit(), ResetCombo().

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

◆ RegisterHit()

bool UComboCounterComponent::RegisterHit ( )
16{
17 UWorld* World = GetWorld();
18
19 if (World == nullptr || ComboResetDelay < KINDA_SMALL_NUMBER)
20 {
21 return false;
22 }
23
24 UAbilitySystemComponent* ASC = GetComboAbilitySystem();
25
26 if (ASC == nullptr)
27 {
28 return false;
29 }
30
31 const FGameplayAttribute ComboAttribute = UPlayerAttributeSet::GetComboCountAttribute();
32 const float NewCount = FMath::Max(ASC->GetNumericAttributeBase(ComboAttribute), 0.0f) + 1.0f;
33
34 World->GetTimerManager().SetTimer
35 (
37 this,
38 &ThisClass::ResetCombo,
40 false
41 );
42
43 ASC->SetNumericAttributeBase(ComboAttribute, NewCount);
45 return true;
46}
int32 GetComboCount() const
Definition ComboCounterComponent.cpp:72
float ComboResetDelay
Definition ComboCounterComponent.h:42
FOnComboCountChanged OnComboCountChanged
Definition ComboCounterComponent.h:45
FTimerHandle ComboResetTimerHandle
Definition ComboCounterComponent.h:52

다음을 참조함 : ComboResetDelay, ComboResetTimerHandle, GetComboAbilitySystem(), GetComboCount(), OnComboCountChanged.

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

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

◆ ResetCombo()

void UComboCounterComponent::ResetCombo ( )
50{
51 UWorld* World = GetWorld();
52
53 if (World == nullptr)
54 {
55 return;
56 }
57
58 World->GetTimerManager().ClearTimer(ComboResetTimerHandle);
59 UAbilitySystemComponent* ASC = GetComboAbilitySystem();
60
61 if (ASC == nullptr || GetComboCount() == 0)
62 {
63 return;
64 }
65
66 ASC->SetNumericAttributeBase(UPlayerAttributeSet::GetComboCountAttribute(), 0.0f);
67 OnComboCountChanged.Broadcast(0);
68 OnComboReset.Broadcast();
69}
FOnComboReset OnComboReset
Definition ComboCounterComponent.h:49

다음을 참조함 : ComboResetTimerHandle, GetComboAbilitySystem(), GetComboCount(), OnComboCountChanged, OnComboReset.

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

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

멤버 데이터 문서화

◆ ComboResetDelay

float UComboCounterComponent::ComboResetDelay = 10.0f
protected

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

◆ ComboResetTimerHandle

FTimerHandle UComboCounterComponent::ComboResetTimerHandle
protected

다음에 의해서 참조됨 : RegisterHit(), ResetCombo().

◆ OnComboCountChanged

FOnComboCountChanged UComboCounterComponent::OnComboCountChanged
protected

다음에 의해서 참조됨 : RegisterHit(), ResetCombo().

◆ OnComboReset

FOnComboReset UComboCounterComponent::OnComboReset
protected

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


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