Beispiel #1
0
        public override void ReportProgress(string _achievementID, int _pointsScored, Action <bool> _onCompletion)
        {
            base.ReportProgress(_achievementID, _pointsScored, _onCompletion);

            if (string.IsNullOrEmpty(_achievementID))
            {
                return;
            }

            // Verify user authentication state before proceeding
            if (!VerifyUser())
            {
                if (_onCompletion != null)
                {
                    _onCompletion(false);
                }

                return;
            }

            // Create new instance
            EditorAchievement _achievement = new EditorAchievement(_achievementID);

            _achievement.PointsScored = _pointsScored;

            // Report progress
            _achievement.ReportProgress(_onCompletion);
        }
Beispiel #2
0
        protected override void LoadAchievementsFinished(IDictionary _dataDict)
        {
            EGCAchievement[] _gcAchievements = _dataDict.GetIfAvailable <EGCAchievement[]>(EditorGameCenter.kAchievementsListKey);
            string           _error          = _dataDict.GetIfAvailable <string>(EditorGameCenter.kErrorKey);

            Achievement[] _newAchievements = EditorAchievement.ConvertAchievementsList(_gcAchievements);

            // Invoke handler
            LoadAchievementsFinished(_newAchievements, _error);
        }
		public override void ReportProgress (string _achievementID, int _pointsScored, Action<bool> _onCompletion)
		{
			base.ReportProgress(_achievementID, _pointsScored, _onCompletion);
			
			if (string.IsNullOrEmpty(_achievementID))
				return;
			
			// Verify user authentication state before proceeding
			if (!VerifyUser())
			{
				if (_onCompletion != null)
					_onCompletion(false);

				return;
			}

			// Create new instance
			EditorAchievement	_achievement	= new EditorAchievement(_achievementID);
			_achievement.PointsScored			= _pointsScored;
			
			// Report progress
			_achievement.ReportProgress(_onCompletion);
		}