in Assets/Xbox Live/Scripts/Stats/StatsManagerComponent.cs [33:67]
private void Update()
{
if (this.manager == null)
{
ExceptionManager.Instance.ThrowException(
ExceptionSource.StatManager,
ExceptionType.UnexpectedException,
new Exception("Somehow the manager got nulled out."));
return;
}
IList<StatisticEvent> events = this.manager.DoWork();
foreach (StatisticEvent statEvent in events)
{
if (XboxLiveServicesSettings.Instance.DebugLogsOn)
{
Debug.LogFormat("[StatsManager] Processed {0} event for {1}.", statEvent.EventType, statEvent.User.Gamertag);
}
switch (statEvent.EventType)
{
case StatisticEventType.LocalUserAdded:
this.OnLocalUserAdded(statEvent.User);
break;
case StatisticEventType.LocalUserRemoved:
this.OnLocalUserRemoved(statEvent.User);
break;
case StatisticEventType.StatisticUpdateComplete:
this.OnStatUpdateComplete();
break;
case StatisticEventType.GetLeaderboardComplete:
this.OnGetLeaderboardCompleted(new StatEventArgs(statEvent));
break;
}
}
}