protected override void OnInitFail() { // Update properties m_userInfo = null; // Reset needless data m_authResponseData = null; base.OnInitFail(); }
protected override void OnInitSuccess() { IDictionary _infoDict = m_authResponseData.GetIfAvailable <IDictionary>(kLocalPlayerInfoKey); // Update properties m_userInfo = new iOSUser(_infoDict); // Reset needless data m_authResponseData = null; base.OnInitSuccess(); }
public static iOSUser[] ConvertToUserList (IUserProfile[] _userList) { if (_userList == null) return null; int _count = _userList.Length; iOSUser[] _iosUsersList = new iOSUser[_count]; for (int _iter = 0; _iter < _count; _iter++) _iosUsersList[_iter] = new iOSUser(_userList[_iter]); return _iosUsersList; }
public static iOSUser[] ConvertUsersList (IList _usersJSONList) { if (_usersJSONList == null) return null; int _count = _usersJSONList.Count; iOSUser[] _usersList = new iOSUser[_count]; for (int _iter = 0; _iter < _count; _iter++) _usersList[_iter] = new iOSUser((IDictionary)_usersJSONList[_iter]); return _usersList; }
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); }
public iOSScore(IDictionary _dataDict) : base() { // Parse data dictionary values string _leaderboardID = _dataDict.GetIfAvailable <string>(kLeaderboardIdentifierKey); IDictionary _userDataDict = _dataDict.GetIfAvailable <IDictionary>(kPlayerKey); LeaderboardGlobalID = GameServicesUtils.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); } }
protected override void AuthenticationFinished(IDictionary _dataDict) { string _error = _dataDict.GetIfAvailable <string>(GameServicesIOS.kNativeMessageErrorKey); if (_error == null) { m_authResponseData = _dataDict; } else { // Update properties Friends = null; m_userInfo = null; } AuthenticationFinished(_error); }
public static iOSUser[] ConvertToUserList(IUserProfile[] _userList) { if (_userList == null) { return(null); } int _count = _userList.Length; iOSUser[] _iosUsersList = new iOSUser[_count]; for (int _iter = 0; _iter < _count; _iter++) { _iosUsersList[_iter] = new iOSUser(_userList[_iter]); } return(_iosUsersList); }
public static iOSUser[] ConvertUsersList(IList _usersJSONList) { if (_usersJSONList == null) { return(null); } int _count = _usersJSONList.Count; iOSUser[] _usersList = new iOSUser[_count]; for (int _iter = 0; _iter < _count; _iter++) { _usersList[_iter] = new iOSUser((IDictionary)_usersJSONList[_iter]); } return(_usersList); }
protected override void LoadFriendsFinished(IDictionary _dataDict) { string _error = _dataDict.GetIfAvailable <string>(GameServicesIOS.kNativeMessageErrorKey); IList _friendJSONList = _dataDict.GetIfAvailable <IList>(kFriendPlayersKey); if (_friendJSONList != null) { int _count = _friendJSONList.Count; iOSUser[] _friends = new iOSUser[_count]; for (int _iter = 0; _iter < _count; _iter++) { _friends[_iter] = new iOSUser((IDictionary)_friendJSONList[_iter]); } // Update property Friends = _friends; } LoadFriendsFinished(Friends, _error); }
protected override void AuthenticationFinished(IDictionary _dataDict) { // Update properties using received information bool _isAuthenticated = IsAuthenticated; if (_isAuthenticated) { IDictionary _infoDict = _dataDict.GetIfAvailable <IDictionary>(kLocalPlayerInfoKey); m_userInfo = new iOSUser(_infoDict); Friends = null; } else { m_userInfo = null; Friends = null; } // Invoke auth finished handler string _error = _dataDict.GetIfAvailable <string>(GameServicesIOS.kNativeMessageErrorKey); AuthenticationFinished(_isAuthenticated, _error); }
protected override void OnInitFail () { // Update properties m_userInfo = null; // Reset needless data m_authResponseData = null; base.OnInitFail (); }
protected override void OnInitSuccess () { IDictionary _infoDict = m_authResponseData.GetIfAvailable<IDictionary>(kLocalPlayerInfoKey); // Update properties m_userInfo = new iOSUser(_infoDict); // Reset needless data m_authResponseData = null; base.OnInitSuccess (); }
protected override void LoadFriendsFinished (IDictionary _dataDict) { string _error = _dataDict.GetIfAvailable<string>(GameServicesIOS.kNativeMessageErrorKey); IList _friendJSONList = _dataDict.GetIfAvailable<IList>(kFriendPlayersKey); if (_friendJSONList != null) { int _count = _friendJSONList.Count; iOSUser[] _friends = new iOSUser[_count]; for (int _iter = 0; _iter < _count; _iter++) _friends[_iter] = new iOSUser((IDictionary)_friendJSONList[_iter]); // Update property Friends = _friends; } LoadFriendsFinished(Friends, _error); }
protected override void AuthenticationFinished (IDictionary _dataDict) { string _error = _dataDict.GetIfAvailable<string>(GameServicesIOS.kNativeMessageErrorKey); if (_error == null) { m_authResponseData = _dataDict; } else { // Update properties Friends = null; m_userInfo = null; } AuthenticationFinished(_error); }