KLingo Project Documentation 1.0.0
Unreal Engine 5.6 C++ Project Documentation
로딩중...
검색중...
일치하는것 없음
UCountDown 클래스 참조

카운트다운 위젯 더 자세히 ...

#include <UCountDown.h>

+ UCountDown에 대한 상속 다이어그램 :
+ UCountDown에 대한 협력 다이어그램:

Public 멤버 함수

void StartCountDown (int32 InStartValue)
 카운트다운을 시작합니다.
 

Public 속성

FOnCountDownFinished OnCountDownFinished
 카운트다운 종료 시 호출되는 Delegate
 

Protected 멤버 함수

virtual void NativeDestruct () override
 

Protected 속성

TObjectPtr< class UWidgetAnimation > Anim_CountDown
 숫자 표시 애니메이션 (블루프린트에서 설정)
 
TObjectPtr< class UBorder > Border_CountDown
 카운트다운 컨테이너
 
TObjectPtr< class UTextBlock > Txt_CountDown
 카운트다운 텍스트
 

Private 멤버 함수

void DisplayCurrentNumber ()
 현재 숫자를 표시하고 애니메이션을 재생합니다.
 
void UpdateCountDown ()
 카운트다운 업데이트 (타이머 콜백)
 

Private 속성

FTimerHandle CountDownTimerHandle
 카운트다운 타이머
 
int32 CountDownValue = 0
 현재 카운트다운 값
 

상세한 설명

카운트다운 위젯

지정된 숫자부터 0까지 카운트다운하며 애니메이션을 표시합니다. 카운트다운이 끝나면 EndCallback을 통해 알립니다.

  • StartValue부터 1까지 1초 간격으로 표시
  • 각 숫자 표시 시 애니메이션 재생 (블루프린트에서 설정)
  • 0에 도달하면 위젯을 숨기고 EndCallback 호출

UCountDown.h 파일의 26 번째 라인에서 정의되었습니다.

멤버 함수 문서화

◆ DisplayCurrentNumber()

void UCountDown::DisplayCurrentNumber ( )
private

현재 숫자를 표시하고 애니메이션을 재생합니다.

UCountDown.cpp 파일의 75 번째 라인에서 정의되었습니다.

76{
77 // 텍스트 업데이트
78 if (Txt_CountDown)
79 {
80 Txt_CountDown->SetText(FText::AsNumber(CountDownValue));
81 }
82
83 // 애니메이션 재생 (블루프린트에서 설정된 경우)
85 {
86 PlayAnimation(Anim_CountDown);
87 }
88}
TObjectPtr< class UWidgetAnimation > Anim_CountDown
숫자 표시 애니메이션 (블루프린트에서 설정)
Definition UCountDown.h:77
int32 CountDownValue
현재 카운트다운 값
Definition UCountDown.h:85
TObjectPtr< class UTextBlock > Txt_CountDown
카운트다운 텍스트
Definition UCountDown.h:69

다음을 참조함 : Anim_CountDown, CountDownValue, Txt_CountDown.

다음에 의해서 참조됨 : StartCountDown(), UpdateCountDown().

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

◆ NativeDestruct()

void UCountDown::NativeDestruct ( )
overrideprotectedvirtual

UCountDown.cpp 파일의 10 번째 라인에서 정의되었습니다.

11{
12 Super::NativeDestruct();
13
14 // 타이머 정리
15 if (GetWorld())
16 {
17 GetWorld()->GetTimerManager().ClearTimer(CountDownTimerHandle);
18 }
19}
FTimerHandle CountDownTimerHandle
카운트다운 타이머
Definition UCountDown.h:88

다음을 참조함 : CountDownTimerHandle.

◆ StartCountDown()

void UCountDown::StartCountDown ( int32  InStartValue)

카운트다운을 시작합니다.

매개변수
[in]InStartValue시작 숫자 (예: 3)

UCountDown.cpp 파일의 21 번째 라인에서 정의되었습니다.

22{
23 if (InStartValue <= 0)
24 {
25 PRINTLOG(TEXT("[CountDown] Invalid start value: %d"), InStartValue);
26 return;
27 }
28
29 CountDownValue = InStartValue;
30
31 // 위젯 표시
33 {
34 Border_CountDown->SetVisibility(ESlateVisibility::Visible);
35 }
36
37 // 첫 번째 숫자 표시
39
40 // 1초마다 업데이트
41 GetWorld()->GetTimerManager().SetTimer(
43 this,
45 1.0f,
46 true
47 );
48}
#define PRINTLOG(fmt,...)
Definition GameLogging.h:30
TObjectPtr< class UBorder > Border_CountDown
카운트다운 컨테이너
Definition UCountDown.h:65
void UpdateCountDown()
카운트다운 업데이트 (타이머 콜백)
void DisplayCurrentNumber()
현재 숫자를 표시하고 애니메이션을 재생합니다.

다음을 참조함 : Border_CountDown, CountDownTimerHandle, CountDownValue, DisplayCurrentNumber(), PRINTLOG, UpdateCountDown().

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

◆ UpdateCountDown()

void UCountDown::UpdateCountDown ( )
private

카운트다운 업데이트 (타이머 콜백)

UCountDown.cpp 파일의 50 번째 라인에서 정의되었습니다.

51{
53
54 if (CountDownValue > 0)
55 {
56 // 다음 숫자 표시
58 }
59 else
60 {
61 // 카운트다운 종료
62 GetWorld()->GetTimerManager().ClearTimer(CountDownTimerHandle);
63
64 // 위젯 숨기기
66 {
67 Border_CountDown->SetVisibility(ESlateVisibility::Hidden);
68 }
69
70 // Delegate 호출
71 OnCountDownFinished.Broadcast();
72 }
73}
FOnCountDownFinished OnCountDownFinished
카운트다운 종료 시 호출되는 Delegate
Definition UCountDown.h:42

다음을 참조함 : Border_CountDown, CountDownTimerHandle, CountDownValue, DisplayCurrentNumber(), OnCountDownFinished.

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

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

멤버 데이터 문서화

◆ Anim_CountDown

TObjectPtr<class UWidgetAnimation> UCountDown::Anim_CountDown
protected

숫자 표시 애니메이션 (블루프린트에서 설정)

UCountDown.h 파일의 77 번째 라인에서 정의되었습니다.

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

◆ Border_CountDown

TObjectPtr<class UBorder> UCountDown::Border_CountDown
protected

카운트다운 컨테이너

UCountDown.h 파일의 65 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : StartCountDown(), UpdateCountDown().

◆ CountDownTimerHandle

FTimerHandle UCountDown::CountDownTimerHandle
private

카운트다운 타이머

UCountDown.h 파일의 88 번째 라인에서 정의되었습니다.

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

◆ CountDownValue

int32 UCountDown::CountDownValue = 0
private

현재 카운트다운 값

UCountDown.h 파일의 85 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : DisplayCurrentNumber(), StartCountDown(), UpdateCountDown().

◆ OnCountDownFinished

FOnCountDownFinished UCountDown::OnCountDownFinished

카운트다운 종료 시 호출되는 Delegate

UCountDown.h 파일의 42 번째 라인에서 정의되었습니다.

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

◆ Txt_CountDown

TObjectPtr<class UTextBlock> UCountDown::Txt_CountDown
protected

카운트다운 텍스트

UCountDown.h 파일의 69 번째 라인에서 정의되었습니다.

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


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