Space Plunder
Loading...
Searching...
No Matches
UQuestPlayerStats Class Reference

#include <QuestPlayerStats.h>

Inheritance diagram for UQuestPlayerStats:
IRewards

Public Member Functions

virtual void SetCredits (const int32 Value) override
 
virtual void SetExperience (const int32 Value) override
 
void OnExperienceSet (const int32 Value)
 

Protected Member Functions

virtual bool Initialize () override
 
virtual void NativePreConstruct () override
 
virtual void NativeConstruct () override
 

Protected Attributes

bool bDebuggingMode = false
 
class UOverlay * CreditsOverlay = nullptr
 
class UOverlay * XPOverlay = nullptr
 
class UProgressBar * XPProgressBar = nullptr
 
class UTextBlock * XPTextBlock = nullptr
 
class UTextBlock * CreditsTextBlock = nullptr
 

Member Function Documentation

◆ Initialize()

bool UQuestPlayerStats::Initialize ( )
overrideprotectedvirtual
12{
13 const bool Success = Super::Initialize();
14 if(!Success) return false;
15 if (!ensure(CreditsOverlay != nullptr)) return false;
16 if (!ensure(XPOverlay != nullptr)) return false;
17 if (!ensure(XPTextBlock != nullptr)) return false;
18 if (!ensure(CreditsTextBlock != nullptr)) return false;
19 if (!ensure(XPProgressBar != nullptr)) return false;
20
21 return true;
22}
class UOverlay * CreditsOverlay
Definition QuestPlayerStats.h:37
class UOverlay * XPOverlay
Definition QuestPlayerStats.h:39
class UProgressBar * XPProgressBar
Definition QuestPlayerStats.h:41
class UTextBlock * XPTextBlock
Definition QuestPlayerStats.h:44
class UTextBlock * CreditsTextBlock
Definition QuestPlayerStats.h:46

◆ NativeConstruct()

void UQuestPlayerStats::NativeConstruct ( )
overrideprotectedvirtual
30{
31 Super::NativeConstruct();
32}

◆ NativePreConstruct()

void UQuestPlayerStats::NativePreConstruct ( )
overrideprotectedvirtual
25{
26 Super::NativePreConstruct();
27}

◆ OnExperienceSet()

void UQuestPlayerStats::OnExperienceSet ( const int32 Value)

◆ SetCredits()

void UQuestPlayerStats::SetCredits ( const int32 Value)
overridevirtual

Implements IRewards.

35{
36 if(CreditsTextBlock == nullptr){return;}
37 CreditsTextBlock->SetText(FText::FromString(FString::FromInt(Value)));
38}

◆ SetExperience()

void UQuestPlayerStats::SetExperience ( const int32 Value)
overridevirtual

Implements IRewards.

41{
42 if(XPTextBlock == nullptr){return;}
43 XPTextBlock->SetText(FText::FromString(FString::FromInt(Value)));
44 if(XPProgressBar != nullptr)
45 {
46 const int32 XPProgress = Value % XP_PER_LEVEL;
47 XPProgressBar->SetPercent(XPProgress / 1000.0f);
48 }
49 OnExperienceSet(Value);
50}
static int32 XP_PER_LEVEL
Definition BaseData.h:707
void OnExperienceSet(const int32 Value)

Member Data Documentation

◆ bDebuggingMode

bool UQuestPlayerStats::bDebuggingMode = false
protected

◆ CreditsOverlay

class UOverlay* UQuestPlayerStats::CreditsOverlay = nullptr
protected

◆ CreditsTextBlock

class UTextBlock* UQuestPlayerStats::CreditsTextBlock = nullptr
protected

◆ XPOverlay

class UOverlay* UQuestPlayerStats::XPOverlay = nullptr
protected

◆ XPProgressBar

class UProgressBar* UQuestPlayerStats::XPProgressBar = nullptr
protected

◆ XPTextBlock

class UTextBlock* UQuestPlayerStats::XPTextBlock = nullptr
protected

The documentation for this class was generated from the following files: