Ejemplo n.º 1
0
        public override void ShowAchievementsUI(GameServiceViewClosed _onCompletion)
        {
            base.ShowAchievementsUI(_onCompletion);

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

            AchievementsManager.ShowUI();
        }
Ejemplo n.º 2
0
        public override void ShowAchievementsUI(GameServiceViewClosed _onCompletion)
        {
            base.ShowAchievementsUI(_onCompletion);

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

            EditorGameCenter.Instance.ShowAchievementsUI();
        }
Ejemplo n.º 3
0
        public override void ShowAchievementsUI(GameServiceViewClosed _onCompletion)
        {
            base.ShowAchievementsUI(_onCompletion);

            if (!VerifyUser())
            {
                return;
            }

            // Native call
            showAchievementView();
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 5
0
        public override void ShowAchievementsUI(GameServiceViewClosed _onCompletion)
        {
            base.ShowAchievementsUI(_onCompletion);

            if (!VerifyUser())
            {
                return;
            }

            // Request for view
            EditorGameCenter.Instance.ShowAchievementsUI(() => {
                ShowAchievementViewFinished(null);
            });
        }
Ejemplo n.º 6
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;
            }
        }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 9
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;
            }
        }
Ejemplo n.º 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);
            });
        }
		/// <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;
			}
		}
Ejemplo n.º 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);
        }
		/// <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);
		}
		public override void ShowAchievementsUI (GameServiceViewClosed _onCompletion)
		{
			base.ShowAchievementsUI(_onCompletion);

			if (!VerifyUser())
				return;

			// Request for view
			EditorGameCenter.Instance.ShowAchievementsUI(()=>{
				ShowAchievementViewFinished(null);
			});
		}
		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);
		}
Ejemplo n.º 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);
        }
		public override void ShowAchievementsUI (GameServiceViewClosed _onCompletion)
		{
			base.ShowAchievementsUI(_onCompletion);

			if (!VerifyUser())
				return;

			// Native call
			showAchievementView();
		}
		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);
		}
		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);
		}
		public override void ShowAchievementsUI (GameServiceViewClosed _onCompletion)
		{
			base.ShowAchievementsUI(_onCompletion);
			
			// Verify auth status
			if (!VerifyUser())
				return;
			
			EditorGameCenter.Instance.ShowAchievementsUI();
		}
		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);
			});
		}
		/// <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;
			}
		}
Ejemplo n.º 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);
        }
		public void ShowLeaderboardUI (string _leaderboardID, eLeaderboardTimeScope _timeScope, GameServiceViewClosed _onCompletion)
		{
			ShowLeaderboardUIWithID(_leaderboardID, _timeScope, _onCompletion);
		}
		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);
		}
		/// <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;
			}
		}
		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);
		}
Ejemplo n.º 28
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);
        }
Ejemplo n.º 29
0
 public void ShowLeaderboardUI(string _leaderboardID, eLeaderboardTimeScope _timeScope, GameServiceViewClosed _onCompletion)
 {
     ShowLeaderboardUIWithID(_leaderboardID, _timeScope, _onCompletion);
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
		/// <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;
			}
		}