#include <RequestGlobalStats.h>
|
| FResponseRequestGlobalStatsDelegate | onSuccess |
| |
| FResponseRequestGlobalStatsDelegate | onFailure |
| |
◆ Activate()
| void URequestGlobalStats::Activate |
( |
| ) |
|
|
overrideprivatevirtual |
17{
18 if (SteamAPI_Init())
19 {
20 SteamAPICall_t hSteamAPICall = SteamUserStats()->RequestGlobalStats(
HistoryInDays);
22 }
23 else
24 {
25 GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("Failed to initialize the Steam API!"));
26
27 onFailure.Broadcast(EResult::k_EResultFail);
28 RemoveFromRoot();
29 }
30
31 return;
32}
FResponseRequestGlobalStatsDelegate onFailure
Definition RequestGlobalStats.h:44
void OnGlobalStatsReceived(GlobalStatsReceived_t *pCallback, bool bIOFailure)
Definition RequestGlobalStats.cpp:34
int32 HistoryInDays
Definition RequestGlobalStats.h:59
CCallResult< URequestGlobalStats, GlobalStatsReceived_t > m_callRequestGlobalStats
Definition RequestGlobalStats.h:62
◆ OnGlobalStatsReceived()
| void URequestGlobalStats::OnGlobalStatsReceived |
( |
GlobalStatsReceived_t * | pCallback, |
|
|
bool | bIOFailure ) |
|
private |
35{
36 if (!bIOFailure && pCallback->m_nGameID == SteamUtils()->GetAppID() && pCallback->m_eResult == EResult::k_EResultOK)
37 {
38 AsyncTask(ENamedThreads::GameThread, [this, pCallback]()
39 {
40 onSuccess.Broadcast(pCallback->m_eResult);
41 }
42 );
43
44 RemoveFromRoot();
45 }
46 else
47 {
48 GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("Failed to receive global stats!"));
49
50 onFailure.Broadcast(pCallback->m_eResult);
51 RemoveFromRoot();
52 }
53
54 return;
55}
FResponseRequestGlobalStatsDelegate onSuccess
Definition RequestGlobalStats.h:41
◆ RequestGlobalStats()
8{
10
12
13 return selfRef;
14}
Definition RequestGlobalStats.h:36
◆ HistoryInDays
| int32 URequestGlobalStats::HistoryInDays = 0 |
|
private |
◆ m_callRequestGlobalStats
| CCallResult<URequestGlobalStats, GlobalStatsReceived_t> URequestGlobalStats::m_callRequestGlobalStats |
|
private |
◆ onFailure
| FResponseRequestGlobalStatsDelegate URequestGlobalStats::onFailure |
◆ onSuccess
| FResponseRequestGlobalStatsDelegate URequestGlobalStats::onSuccess |
The documentation for this class was generated from the following files:
- T:/Unreal/Unreal Projects/SpaceAdventure52/SpaceAdventure/Plugins/SteamStats/Source/StatsIntegration/Public/RequestGlobalStats.h
- T:/Unreal/Unreal Projects/SpaceAdventure52/SpaceAdventure/Plugins/SteamStats/Source/StatsIntegration/Private/RequestGlobalStats.cpp