internal AndroidLeaderboard(IDictionary _leaderboardData) { Identifier = _leaderboardData.GetIfAvailable <string>(kIdentifier); string _userScope = _leaderboardData.GetIfAvailable <string>(kUserScope); UserScope = kUserScopeMap[_userScope]; string _timeScope = _leaderboardData.GetIfAvailable <string>(kTimeScope); TimeScope = kTimeScopeMap[_timeScope]; Title = _leaderboardData.GetIfAvailable <string>(kTitle); IList _scoresList = _leaderboardData.GetIfAvailable <List <object> >(kScores); Scores = AndroidScore.ConvertScoreList(_scoresList); IDictionary _localScore = _leaderboardData.GetIfAvailable <Dictionary <string, object> >(kLocalUserScore); LocalUserScore = AndroidScore.ConvertScore(_localScore); // Set global identifier GlobalIdentifier = GameServicesIDHandler.GetLeaderboardGID(Identifier); }
public EditorAchievement(EGCAchievement _gcAchievementInfo) { // Set properties from info object Identifier = _gcAchievementInfo.Identifier; PointsScored = _gcAchievementInfo.PointsScored; Completed = _gcAchievementInfo.Completed; LastReportedDate = _gcAchievementInfo.LastReportedDate; // Set global identifier GlobalIdentifier = GameServicesIDHandler.GetAchievementGID(Identifier); }
public EditorLeaderboard(EGCLeaderboard _gcLeaderboardInfo) { // Set properties from info object Identifier = _gcLeaderboardInfo.Identifier; Title = _gcLeaderboardInfo.Title; Scores = null; LocalUserScore = null; // Set global identifier GlobalIdentifier = GameServicesIDHandler.GetLeaderboardGID(Identifier); }
public iOSAchievement(IDictionary _dataDict) { // Parse data dictionary values Identifier = _dataDict.GetIfAvailable <string>(kIdentifierKey); Completed = _dataDict.GetIfAvailable <bool>(kCompletedKey); LastReportedDate = _dataDict.GetIfAvailable <string>(kLastReportedDateKey).ToZuluFormatDateTimeLocal(); SetPercentComplete(_dataDict.GetIfAvailable <double>(kPercentCompleteKey)); // Set global identifier GlobalIdentifier = GameServicesIDHandler.GetAchievementGID(Identifier); }
internal EditorScore(EGCScore _scoreInfo) { string _leaderboardID = _scoreInfo.LeaderboardID; // Set properties LeaderboardGlobalID = GameServicesIDHandler.GetLeaderboardGID(_leaderboardID); LeaderboardID = _leaderboardID; User = new EditorUser(_scoreInfo.User); Value = _scoreInfo.Value; Date = _scoreInfo.Date; Rank = _scoreInfo.Rank; }
public iOSAchievementDescription(IDictionary _dataDict) { // Parse data dictionary values Identifier = _dataDict.GetIfAvailable <string>(kIdentifierKey); Title = _dataDict.GetIfAvailable <string>(kTitleKey); UnachievedDescription = _dataDict.GetIfAvailable <string>(kUnachievedDescriptionKey); AchievedDescription = _dataDict.GetIfAvailable <string>(kAchievedDescriptionKey); MaximumPoints = _dataDict.GetIfAvailable <int>(kMaximumPointsKey); IsHidden = _dataDict.GetIfAvailable <bool>(kHiddenKey); // Set global identifier GlobalIdentifier = GameServicesIDHandler.GetAchievementGID(Identifier); }
public EditorAchievementDescription(EGCAchievementDescription _gcDescriptionInfo) { // Set properties from info object Identifier = _gcDescriptionInfo.Identifier; Title = _gcDescriptionInfo.Title; UnachievedDescription = _gcDescriptionInfo.UnachievedDescription; AchievedDescription = _gcDescriptionInfo.AchievedDescription; MaximumPoints = _gcDescriptionInfo.MaximumPoints; IsHidden = _gcDescriptionInfo.IsHidden; // Set global identifier GlobalIdentifier = GameServicesIDHandler.GetAchievementGID(Identifier); }
internal AndroidScore(IDictionary _scoreData) { LeaderboardID = _scoreData.GetIfAvailable <string>(kIdentifier); LeaderboardGlobalID = GameServicesIDHandler.GetLeaderboardGID(LeaderboardID); User = new AndroidUser(_scoreData.GetIfAvailable <Dictionary <string, object> >(kUser)); Value = _scoreData.GetIfAvailable <long>(kValue); long _timeInMillis = _scoreData.GetIfAvailable <long>(kDate); Date = _timeInMillis.ToDateTimeFromJavaTime(); Rank = _scoreData.GetIfAvailable <int>(kRank); }
internal void SetDetails(IDictionary _achievementData) { Identifier = _achievementData.GetIfAvailable <string>(kIdentifier); PointsScored = _achievementData.GetIfAvailable <int>(kPointsScored); Completed = _achievementData.GetIfAvailable <bool>(kCompleted); long _timeInMillis = _achievementData.GetIfAvailable <long>(kLastReportDate); LastReportedDate = _timeInMillis.ToDateTimeFromJavaTime(); PointsScored = m_pointsScored; GlobalIdentifier = GameServicesIDHandler.GetAchievementGID(Identifier); }
public iOSLeaderboard(IDictionary _dataDict) : base() { // Parse data dictionary values Identifier = _dataDict.GetIfAvailable <string>(kIdentifierKey); Title = _dataDict.GetIfAvailable <string>(kTitleKey); UserScope = (eLeaderboardUserScope)_dataDict.GetIfAvailable <int>(kPlayerScopeKey); TimeScope = (eLeaderboardTimeScope)_dataDict.GetIfAvailable <int>(kTimeScopeKey); Scores = null; LocalUserScore = null; m_range = new Range(0, 0); // Set global identifier GlobalIdentifier = GameServicesIDHandler.GetLeaderboardGID(Identifier); }
public iOSScore(IDictionary _dataDict) : base() { // Parse data dictionary values string _leaderboardID = _dataDict.GetIfAvailable <string>(kLeaderboardIdentifierKey); IDictionary _userDataDict = _dataDict.GetIfAvailable <IDictionary>(kPlayerKey); LeaderboardGlobalID = GameServicesIDHandler.GetLeaderboardGID(_leaderboardID); LeaderboardID = _leaderboardID; Value = _dataDict.GetIfAvailable <long>(kValueKey); Date = _dataDict.GetIfAvailable <string>(kDateKey).ToZuluFormatDateTimeLocal(); Rank = _dataDict.GetIfAvailable <int>(kRankKey); if (_userDataDict != null) { User = new iOSUser(_userDataDict); } }