示例#1
0
        void IAuth.Login(Action onComplete, Action onFailure)
        {
            if (RestartAppIfNecessary && SteamClient.RestartAppIfNecessary(AppId))
            {
                if (UApplication.isEditor)
                {
                    ExceptionHandler.Process(new SteamIsNotRunningException());

                    onFailure();
                }
                else
                {
                    UApplication.Quit();
                }

                return;
            }

            try
            {
                SteamClient.Init(AppId);

                onComplete();
            }
            catch
            {
                ExceptionHandler.Process(new SteamIsNotRunningException());

                onFailure();
            }
        }
 private static void RestartGame()
 {
     // This operation will cause the "Resolution Dialog" to appear instead of the game's
     // main-menu just reappearing.  Oh well!  It's better than nothing, I guess.
     try { Process.Start(QudExecutable); }
     catch { }
     finally { Application.Quit(); }
 }
示例#3
0
 /// <summary>
 /// Fired when the user clicks on the GUI object.
 /// This will exit the game.
 ///
 /// Note: this will do nothing if the game is running Unity's Game Editor.
 /// </summary>
 protected override void OnClick()
 {
     Application.Quit();
 }