예제 #1
0
        /// <summary>
        /// This command is used to login again or login from guest mode to normal or vice versa
        /// </summary>
        /// <param name="logout">return true if Successful</param>
        /// <param name="error">Error</param>
        public void LogOut(DelegateCore.IsUserLogout logout, DelegateCore.OnError error)
        {
            if (_gameServiceObj == null)
            {
                if (_isAvailable)
                {
                    if (FiroozehGameService.Configuration.EnableLog)
                    {
                        LogUtil.LogError(Tag, "GameService Is NotAvailable yet");
                    }
                }
                else
                {
                    if (FiroozehGameService.Configuration.EnableLog)
                    {
                        LogUtil.LogError(Tag, "You Logout Before ,You Must Config it Again...");
                    }
                }
                return;
            }

            _gameServiceObj.Call("Logout", new IGameServiceCallback(c =>
            {
                _gameServiceObj = null;
                _isAvailable    = false;
                logout.Invoke(true);
            }, error.Invoke));
        }
예제 #2
0
 /// <summary>
 /// Logout To Game Service
 /// </summary>
 /// <param name="logout">(Not NULL)Returns the correct value if successful.</param>
 /// <param name="error">(Not NULL)In case of error, error will be returned</param>
 public static void Logout(DelegateCore.IsUserLogout logout, DelegateCore.OnError error)
 {
     Instance.LogOut(logout.Invoke, error.Invoke);
 }