Пример #1
0
        public static void BackToLobby()
        {
            Debug.Log("BackToLobby called!");
            //TODO: ensure PlayerUser stats updated before this was called (i.e. progress saved)

            MenuInGameObject?.GetComponent <MenuInGame>()?.UpdateNow();
            MenuInGameObject?.GetComponent <MenuInGame>().Show(false);
            //_statusInGameComponent?.Show(false);

            if (CurrentLevel != Level.LobbyLevel)
            {
                CurrentLevel.CleanUp();
                CurrentLevel.gameObject.SetActive(false);
                CurrentLevel = Level.LobbyLevel;
                Level.LobbyLevel.gameObject.SetActive(true);
                PlayerUser.ResetPlayerPosition();
            }
            else
            {
                Debug.LogWarning("LevelMgr.BackToLobby() called from the Lobby!");
            }

            DisplayInfoDesktop.SetDisplayInfo("");
        }