Added AchievementEventHandler to AchievementManager
AchievementEventHandler simply checks which kind of event is triggered and calls the appropriate function. Its primary purpose is as a function to be pointed to.
This commit is contained in:
parent
a48fab0abf
commit
ed121a4033
|
@ -202,6 +202,19 @@ void AchievementManager::ActivateDeactivateRichPresence()
|
||||||
nullptr, 0);
|
nullptr, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AchievementManager::AchievementEventHandler(const rc_runtime_event_t* runtime_event)
|
||||||
|
{
|
||||||
|
switch (runtime_event->type)
|
||||||
|
{
|
||||||
|
case RC_RUNTIME_EVENT_ACHIEVEMENT_TRIGGERED:
|
||||||
|
HandleAchievementTriggeredEvent(runtime_event);
|
||||||
|
break;
|
||||||
|
case RC_RUNTIME_EVENT_LBOARD_TRIGGERED:
|
||||||
|
HandleLeaderboardTriggeredEvent(runtime_event);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void AchievementManager::CloseGame()
|
void AchievementManager::CloseGame()
|
||||||
{
|
{
|
||||||
m_is_game_loaded = false;
|
m_is_game_loaded = false;
|
||||||
|
|
|
@ -48,6 +48,8 @@ public:
|
||||||
void ActivateDeactivateLeaderboards();
|
void ActivateDeactivateLeaderboards();
|
||||||
void ActivateDeactivateRichPresence();
|
void ActivateDeactivateRichPresence();
|
||||||
|
|
||||||
|
void AchievementEventHandler(const rc_runtime_event_t* runtime_event);
|
||||||
|
|
||||||
void CloseGame();
|
void CloseGame();
|
||||||
void Logout();
|
void Logout();
|
||||||
void Shutdown();
|
void Shutdown();
|
||||||
|
|
Loading…
Reference in New Issue