コード例 #1
0
        public override void ShowAchievementsUI(GameServiceViewClosed _onCompletion)
        {
            base.ShowAchievementsUI(_onCompletion);

            // Check if valid account
            if (!VerifyUser())
            {
                return;
            }

            AchievementsManager.ShowUI();
        }
コード例 #2
0
        public override void ShowAchievementsUI(GameServiceViewClosed _onCompletion)
        {
            base.ShowAchievementsUI(_onCompletion);

            // Verify auth status
            if (!VerifyUser())
            {
                return;
            }

            EditorGameCenter.Instance.ShowAchievementsUI();
        }
コード例 #3
0
ファイル: GameServicesIOS.cs プロジェクト: georgex1/rednit
        public override void ShowAchievementsUI(GameServiceViewClosed _onCompletion)
        {
            base.ShowAchievementsUI(_onCompletion);

            if (!VerifyUser())
            {
                return;
            }

            // Native call
            showAchievementView();
        }
コード例 #4
0
        public override void ShowAchievementsUI(GameServiceViewClosed _onCompletion)
        {
            base.ShowAchievementsUI(_onCompletion);

            // Verify auth status
            if (!VerifyUser())
            {
                return;
            }

            // Native method call
            Plugin.Call(Native.Methods.SHOW_ACHIEVEMENTS_UI);
        }
コード例 #5
0
        public override void ShowAchievementsUI(GameServiceViewClosed _onCompletion)
        {
            base.ShowAchievementsUI(_onCompletion);

            if (!VerifyUser())
            {
                return;
            }

            // Request for view
            EditorGameCenter.Instance.ShowAchievementsUI(() => {
                ShowAchievementViewFinished(null);
            });
        }
コード例 #6
0
ファイル: GameServices.cs プロジェクト: georgex1/rednit
        /// <summary>
        /// Shows the default achievements UI.
        /// </summary>
        /// <param name="_onCompletion">Callback called when Achievements view is closed.</param>
        public virtual void ShowAchievementsUI(GameServiceViewClosed _onCompletion)
        {
            // Cache callback
            m_showAchievementViewFinished = _onCompletion;

            // Pause unity
            this.PauseUnity();

            // Check if valid account
            if (!VerifyUser())
            {
                ShowAchievementViewFinished(null);
                return;
            }
        }
コード例 #7
0
        /// <summary>
        /// Opens standard view to display leaderboard scores corresponding to given platform specific id.
        /// </summary>
        /// <param name="_leaderboardID">A string used to identify the leaderboard in the current platform.</param>
        /// <param name="_timeScope">A time filter used to restrict which scores are displayed to the user.</param>
        /// <param name="_onCompletion">Callback that will be called after operation is completed.</param>
        /// <remarks>
        /// \note Incase, if you want to list out all the leaderboards that are used in your game, then pass <c>null</c> for leaderboard identifier.
        /// </remarks>
        public virtual void ShowLeaderboardUIWithID(string _leaderboardID, eLeaderboardTimeScope _timeScope, GameServiceViewClosed _onCompletion)
        {
            // Cache callback
            ShowLeaderboardViewFinishedEvent = _onCompletion;

            // Pause unity
            this.PauseUnity();

            // Check if valid account
            if (!VerifyUser())
            {
                ShowLeaderboardViewFinished(Constants.kGameServicesUserAuthMissingError);
                return;
            }
        }
コード例 #8
0
        /// <summary>
        /// Opens standard view to display achievement progress screen for the local player.
        /// </summary>
        /// <param name="_onCompletion">Callback that will be called after operation is completed.</param>
        public virtual void ShowAchievementsUI(GameServiceViewClosed _onCompletion)
        {
            // Cache callback
            ShowAchievementViewFinishedEvent = _onCompletion;

            // Pause unity
            this.PauseUnity();

            // Check if valid account
            if (!VerifyUser())
            {
                ShowAchievementViewFinished(Constants.kGameServicesUserAuthMissingError);
                return;
            }
        }
コード例 #9
0
ファイル: GameServices.cs プロジェクト: georgex1/rednit
        /// <summary>
        /// Show the leaderboard UI with a specific leaderboard shown initially with a specific time scope.
        /// </summary>
        /// <param name="_leaderboardID">A string used to uniquely identify the specific <see cref="VoxelBusters.NativePlugins.Leaderboard"/> object refers to.</param>
        /// <param name="_timeScope">Time scope initially used while showing leaderboard UI.</param>
        /// <param name="_onCompletion">Callback called when Leaderboard view is closed.</param>
        public virtual void ShowLeaderboardUI(string _leaderboardID, eLeaderboardTimeScope _timeScope, GameServiceViewClosed _onCompletion)
        {
            // Cache callback
            m_showLeaderboardViewFinished = _onCompletion;

            // Pause unity
            this.PauseUnity();

            // Check if learboard identifier is valid
            if (string.IsNullOrEmpty(_leaderboardID))
            {
                DebugPRO.Console.LogError(Constants.kDebugTag, "[GameServices] Leaderboard identifier cant be null/empty.");
                ShowLeaderboardViewFinished(null);
                return;
            }

            // Check if valid account
            if (!VerifyUser())
            {
                ShowLeaderboardViewFinished(null);
                return;
            }
        }
コード例 #10
0
        public override void ShowLeaderboardUI(string _leaderboardID, eLeaderboardTimeScope _timeScope, GameServiceViewClosed _onCompletion)
        {
            base.ShowLeaderboardUI(_leaderboardID, _timeScope, _onCompletion);

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

            if (!VerifyUser())
            {
                return;
            }

            // Request for view
            EditorGameCenter.Instance.ShowLeaderboardUI(_leaderboardID, _timeScope, () => {
                ShowLeaderboardViewFinished(null);
            });
        }
コード例 #11
0
		/// <summary>
		/// Show the leaderboard UI with a specific time scope.
		/// </summary>
		/// <param name="_leaderboardID">A string used to uniquely identify <see cref="VoxelBusters.NativePlugins.Leaderboard"/> specific to current platform.</param>
		/// <param name="_timeScope">Time scope initially used while showing leaderboard UI.</param>
		/// <param name="_onCompletion">Callback called when Leaderboard view is closed.</param>
		public virtual void ShowLeaderboardUIWithID (string _leaderboardID, eLeaderboardTimeScope _timeScope, GameServiceViewClosed _onCompletion)
		{
			// Cache callback
			ShowLeaderboardViewFinishedEvent	= _onCompletion;

			// Pause unity
			this.PauseUnity();

			// Check if valid account
			if (!VerifyUser())
			{
				ShowLeaderboardViewFinished(Constants.kGameServicesUserAuthMissingError);
				return;
			}
		}
コード例 #12
0
        public override void ShowLeaderboardUIWithID(string _leaderboardID, eLeaderboardTimeScope _timeScope, GameServiceViewClosed _onCompletion)
        {
            base.ShowLeaderboardUIWithID(_leaderboardID, _timeScope, _onCompletion);

            // Verify auth status
            if (!VerifyUser())
            {
                return;
            }

            // Native method call
            string _timeScopeString = AndroidLeaderboard.kTimeScopeMap.GetKey <eLeaderboardTimeScope>(_timeScope);

            Plugin.Call(Native.Methods.SHOW_LEADERBOARD_UI, _leaderboardID, _timeScopeString);
        }
コード例 #13
0
		/// <summary>
		/// Show the leaderboard UI with a specific time scope.
		/// </summary>
		/// <param name="_leaderboardGID">A string used to uniquely identify <see cref="VoxelBusters.NativePlugins.Leaderboard"/> across all supported platforms.</param>
		/// <param name="_timeScope">Time scope initially used while showing leaderboard UI.</param>
		/// <param name="_onCompletion">Callback called when Leaderboard view is closed.</param>
		public void ShowLeaderboardUIWithGlobalID (string _leaderboardGID, eLeaderboardTimeScope _timeScope, GameServiceViewClosed _onCompletion)
		{
			string	_leaderboardID	= GameServicesIDHandler.GetLeaderboardID(_leaderboardGID);

			ShowLeaderboardUIWithID(_leaderboardID, _timeScope, _onCompletion);
		}
コード例 #14
0
		public override void ShowAchievementsUI (GameServiceViewClosed _onCompletion)
		{
			base.ShowAchievementsUI(_onCompletion);

			if (!VerifyUser())
				return;

			// Request for view
			EditorGameCenter.Instance.ShowAchievementsUI(()=>{
				ShowAchievementViewFinished(null);
			});
		}
コード例 #15
0
		public override void ShowAchievementsUI (GameServiceViewClosed _onCompletion)
		{
			base.ShowAchievementsUI(_onCompletion);
			
			// Verify auth status
			if (!VerifyUser())
				return;
			
			// Native method call
			Plugin.Call(Native.Methods.SHOW_ACHIEVEMENTS_UI);
		}
コード例 #16
0
        /// <summary>
        /// Opens standard view to display leaderboard scores corresponding to given unified id.
        /// </summary>
        /// <param name="_leaderboardGID">An unified string internally used to identify the leaderboard across all the supported platforms.</param>
        /// <param name="_timeScope">A time filter used to restrict which scores are displayed to the user.</param>
        /// <param name="_onCompletion">Callback that will be called after operation is completed.</param>
        /// <remarks>
        /// Incase, if you want to list out all the leaderboards that are used in your game, then pass <c>null</c> for leaderboard identifier.
        /// \note Works only if, leaderboard metadata was configured in NPSettings or else explicitely set using <see cref="SetLeaderboardMetadataCollection"/>.
        /// </remarks>
        public void ShowLeaderboardUIWithGlobalID(string _leaderboardGID, eLeaderboardTimeScope _timeScope, GameServiceViewClosed _onCompletion)
        {
            string _leaderboardID = GameServicesUtils.GetLeaderboardID(_leaderboardGID);

            ShowLeaderboardUIWithID(_leaderboardID, _timeScope, _onCompletion);
        }
コード例 #17
0
		public override void ShowAchievementsUI (GameServiceViewClosed _onCompletion)
		{
			base.ShowAchievementsUI(_onCompletion);

			if (!VerifyUser())
				return;

			// Native call
			showAchievementView();
		}
コード例 #18
0
		public override void ShowLeaderboardUIWithID (string _leaderboardID, eLeaderboardTimeScope _timeScope, GameServiceViewClosed _onCompletion)
		{
			base.ShowLeaderboardUIWithID(_leaderboardID, _timeScope, _onCompletion);
			
			// Verify auth status
			if (!VerifyUser())
				return;

			// Native method call
			showLeaderboardView(_leaderboardID, (int)_timeScope);
		}
コード例 #19
0
		public override void ShowLeaderboardUIWithID (string _leaderboardID, eLeaderboardTimeScope _timeScope, GameServiceViewClosed _onCompletion)
		{
			base.ShowLeaderboardUIWithID(_leaderboardID, _timeScope, _onCompletion);
			
			// Verify auth status
			if (!VerifyUser())
				return;
			
			EditorGameCenter.Instance.ShowLeaderboardUI(_leaderboardID, _timeScope);
		}
コード例 #20
0
		public override void ShowAchievementsUI (GameServiceViewClosed _onCompletion)
		{
			base.ShowAchievementsUI(_onCompletion);
			
			// Verify auth status
			if (!VerifyUser())
				return;
			
			EditorGameCenter.Instance.ShowAchievementsUI();
		}
コード例 #21
0
		public override void ShowLeaderboardUI (string _leaderboardID, eLeaderboardTimeScope _timeScope, GameServiceViewClosed _onCompletion)
		{
			base.ShowLeaderboardUI(_leaderboardID, _timeScope, _onCompletion);

			if (string.IsNullOrEmpty(_leaderboardID))
				return;

			if (!VerifyUser())
				return;
		
			// Request for view
			EditorGameCenter.Instance.ShowLeaderboardUI(_leaderboardID, _timeScope, ()=>{
				ShowLeaderboardViewFinished(null);
			});
		}
コード例 #22
0
		/// <summary>
		/// Shows the default achievements UI.
		/// </summary>
		/// <param name="_onCompletion">Callback called when Achievements view is closed.</param>
		public virtual void ShowAchievementsUI (GameServiceViewClosed _onCompletion)
		{
			// Cache callback
			ShowAchievementViewFinishedEvent	= _onCompletion;
			
			// Pause unity
			this.PauseUnity();
			
			// Check if valid account
			if (!VerifyUser())
			{
				ShowAchievementViewFinished(Constants.kGameServicesUserAuthMissingError);
				return;
			}
		}
コード例 #23
0
        public override void ShowLeaderboardUIWithID(string _leaderboardID, eLeaderboardTimeScope _timeScope, GameServiceViewClosed _onCompletion)
        {
            base.ShowLeaderboardUIWithID(_leaderboardID, _timeScope, _onCompletion);

            // Verify auth status
            if (!VerifyUser())
            {
                return;
            }

            EditorGameCenter.Instance.ShowLeaderboardUI(_leaderboardID, _timeScope);
        }
コード例 #24
0
		public void ShowLeaderboardUI (string _leaderboardID, eLeaderboardTimeScope _timeScope, GameServiceViewClosed _onCompletion)
		{
			ShowLeaderboardUIWithID(_leaderboardID, _timeScope, _onCompletion);
		}
コード例 #25
0
		public override void ShowLeaderboardUIWithID (string _leaderboardID, eLeaderboardTimeScope _timeScope, GameServiceViewClosed _onCompletion)
		{
			base.ShowLeaderboardUIWithID(_leaderboardID, _timeScope, _onCompletion);
			
			// Verify auth status
			if (!VerifyUser())
				return;
			
			// Native method call
			string _timeScopeString = AndroidLeaderboard.kTimeScopeMap.GetKey<eLeaderboardTimeScope>(_timeScope);
			Plugin.Call(Native.Methods.SHOW_LEADERBOARD_UI, _leaderboardID, _timeScopeString);
		}
コード例 #26
0
		/// <summary>
		/// Show the leaderboard UI with a specific leaderboard shown initially with a specific time scope.
		/// </summary>
		/// <param name="_leaderboardID">A string used to uniquely identify the specific <see cref="VoxelBusters.NativePlugins.Leaderboard"/> object refers to.</param>
		/// <param name="_timeScope">Time scope initially used while showing leaderboard UI.</param>
		/// <param name="_onCompletion">Callback called when Leaderboard view is closed.</param>
		public virtual void ShowLeaderboardUI (string _leaderboardID, eLeaderboardTimeScope _timeScope, GameServiceViewClosed _onCompletion)
		{
			// Cache callback
			m_showLeaderboardViewFinished	= _onCompletion;

			// Pause unity
			this.PauseUnity();

			// Check if learboard identifier is valid
			if (string.IsNullOrEmpty(_leaderboardID))
			{
				DebugPRO.Console.LogError(Constants.kDebugTag, "[GameServices] Leaderboard identifier cant be null/empty.");
				ShowLeaderboardViewFinished(null);
				return;
			}

			// Check if valid account
			if (!VerifyUser())
			{
				ShowLeaderboardViewFinished(null);
				return;
			}
		}
コード例 #27
0
		public override void ShowLeaderboardUI (string _leaderboardID, eLeaderboardTimeScope _timeScope, GameServiceViewClosed _onCompletion)
		{
			base.ShowLeaderboardUI(_leaderboardID, _timeScope, _onCompletion);
			
			if (string.IsNullOrEmpty(_leaderboardID))
				return;
			
			if (!VerifyUser())
				return;

			// Native call
			showLeaderboardView(_leaderboardID, (int)_timeScope);
		}
コード例 #28
0
ファイル: GameServicesIOS.cs プロジェクト: georgex1/rednit
        public override void ShowLeaderboardUI(string _leaderboardID, eLeaderboardTimeScope _timeScope, GameServiceViewClosed _onCompletion)
        {
            base.ShowLeaderboardUI(_leaderboardID, _timeScope, _onCompletion);

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

            if (!VerifyUser())
            {
                return;
            }

            // Native call
            showLeaderboardView(_leaderboardID, (int)_timeScope);
        }
コード例 #29
0
 public void ShowLeaderboardUI(string _leaderboardID, eLeaderboardTimeScope _timeScope, GameServiceViewClosed _onCompletion)
 {
     ShowLeaderboardUIWithID(_leaderboardID, _timeScope, _onCompletion);
 }
コード例 #30
0
        public override void ShowLeaderboardUIWithID(string _leaderboardID, eLeaderboardTimeScope _timeScope, GameServiceViewClosed _onCompletion)
        {
            base.ShowLeaderboardUIWithID(_leaderboardID, _timeScope, _onCompletion);

            // Verify auth status
            if (!VerifyUser())
            {
                return;
            }

            // Native method call
            showLeaderboardView(_leaderboardID, (int)_timeScope);
        }
コード例 #31
0
        public override void ShowLeaderboardUI(string _leaderboardID, eLeaderboardTimeScope _timeScope, GameServiceViewClosed _onCompletion)
        {
            base.ShowLeaderboardUI(_leaderboardID, _timeScope, _onCompletion);

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

            // Check if valid account
            if (!VerifyUser())
            {
                return;
            }

            LeaderboardsManager.ShowUI(_leaderboardID, _timeScope);
        }
コード例 #32
0
		/// <summary>
		/// Shows the default achievements UI.
		/// </summary>
		/// <param name="_onCompletion">Callback called when Achievements view is closed.</param>
		public virtual void ShowAchievementsUI (GameServiceViewClosed _onCompletion)
		{
			// Cache callback
			m_showAchievementViewFinished	= _onCompletion;
			
			// Pause unity
			this.PauseUnity();
			
			// Check if valid account
			if (!VerifyUser())
			{
				ShowAchievementViewFinished(null);
				return;
			}
		}