private void EndGameStat(EndGameType type) { if (ConnectionHelper.IsConnected) { try { _userPointsManager.Endgame(type == EndGameType.Won); // Can only add score for quick game (because we know the total point) if (IsQuickGame()) { LeaderboardAccess.Instance.AddLeaderEntry(Model.ZonesHashId.FirstOrDefault(), new LeaderModel() { PlayerHashId = Profile.Instance.CurrentProfile.UserHashId, PlayerName = Profile.Instance.CurrentProfile.Username, Points = _userPointsManager.GetMyPoints() }); } } catch (Exception) { // ignored } } }
public void EndGame(EndGameType type) { // Manage stats and achievements related to the game _userPointsManager.Endgame(); }