示例#1
0
        public void OnApplicationPause(bool paused)
        {
            /*if (Application.isEditor)
             * {
             *  return;
             * }*/

            if (!isSomethingRunning())
            {
                if (paused && GameState.Data.isSaveOnSuspend())
                {
                    GameState.OnGameSuspend();
                }

                /*if (!paused && GameState.Data.isRestoreAfterOpen())
                 * {
                 *  // TODO REPARE RESTORE AFTER OPEN
                 *  GameState.OnGameResume();
                 *  if (started)
                 *  {
                 *      var gameReadyOrderedExtensions = PriorityAttribute.OrderExtensionsByMethod("OnGameReady", gameExtensions);
                 *      RunTarget(GameState.CurrentTarget);
                 *      gameReadyOrderedExtensions.ForEach(g => g.OnGameReady());
                 *      uAdventureInputModule.LookingForTarget = null;
                 *  }
                 * }*/
            }
        }
        public void OnApplicationPause(bool paused)
        {
            if (Application.isEditor)
            {
                return;
            }

            if (!isSomethingRunning())
            {
                if (paused && GameState.Data.isSaveOnSuspend())
                {
                    GameState.OnGameSuspend();
                }

                if (!paused && GameState.Data.isRestoreAfterOpen())
                {
                    // TODO REPARE RESTORE AFTER OPEN
                    GameState.OnGameResume();
                    if (started)
                    {
                        RunTarget(GameState.CurrentTarget);
                        gameExtensions.ForEach(g => g.OnGameReady());
                        uAdventureInputModule.LookingForTarget = null;
                    }
                }
            }
        }
示例#3
0
 public void OnApplicationPause(bool paused)
 {
     if (paused)
     {
         GameState.OnGameSuspend();
     }
     else
     {
         GameState.OnGameResume();
         if (started)
         {
             RunTarget(GameState.CurrentTarget);
             gameExtensions.ForEach(g => g.OnAfterGameLoad());
             uAdventureInputModule.LookingForTarget = null;
         }
     }
 }
示例#4
0
 public void OnApplicationPause(bool paused)
 {
     if (!isSomethingRunning())
     {
         if (paused)
         {
             GameState.OnGameSuspend();
         }
         else if (Application.isMobilePlatform)
         {
             GameState.OnGameResume();
             if (started)
             {
                 RunTarget(GameState.CurrentTarget);
                 gameExtensions.ForEach(g => g.OnGameReady());
                 uAdventureInputModule.LookingForTarget = null;
             }
         }
     }
 }