Esempio n. 1
0
        public IEnumerator DeleteMatchLobby(string matchLobbyId)
        {
            var matchLobbyHandler = new MatchLobbyHandler(ApplicationModel.CurrentPlayer);

            yield return(matchLobbyHandler.DeleteMatchLobby(matchLobbyId));

            Debug.Log($"MatchLobby deleted: {matchLobbyId}");
            ApplicationModel.CurrentMatchLobby = null;
        }
Esempio n. 2
0
        public IEnumerator DeleteMatchLobbyAndLeaveNetwork(string matchLobbyId)
        {
            var matchLobbyHandler = new MatchLobbyHandler(ApplicationModel.CurrentPlayer);

            yield return(matchLobbyHandler.DeleteMatchLobby(matchLobbyId));

            yield return(partyNetworkHandler.LeaveNetwork());

            ApplicationModel.CurrentMatchLobby = null;
        }
Esempio n. 3
0
        private void StartMatch()
        {
            if (StartMatchConditionsMet())
            {
                if (ApplicationModel.CurrentMatchLobby != null && ApplicationModel.IsHost)
                {
                    var matchLobbyHandler = new MatchLobbyHandler(ApplicationModel.CurrentPlayer);
                    StartCoroutine(matchLobbyHandler.DeleteMatchLobby(ApplicationModel.CurrentMatchLobby.matchLobbyId));
                }

                CreateCurrentMatch();
                SceneManager.LoadScene("Game");
            }
        }
Esempio n. 4
0
        private IEnumerator DeleteMatchLobby()
        {
            var matchLobbyHandler = new MatchLobbyHandler(CurrentPlayer);

            yield return(matchLobbyHandler.DeleteMatchLobby(MatchLobby.matchLobbyId));
        }