コード例 #1
0
ファイル: GameServicesIOS.cs プロジェクト: georgex1/rednit
        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 achievement instance
            iOSAchievement _achievement = new iOSAchievement(_achievementID);

            // Set new score and report
            _achievement.PointsScored = _pointsScored;
            _achievement.ReportProgress(_onCompletion);
        }
コード例 #2
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 achievement instance
			iOSAchievement	_achievement	= new iOSAchievement(_achievementID);
			
			// Set new score and report
			_achievement.PointsScored		= _pointsScored;
			_achievement.ReportProgress(_onCompletion);
		}