Exemplo 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;
        }
Exemplo 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;
        }
Exemplo 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");
            }
        }
Exemplo n.º 4
0
        private IEnumerator DeleteMatchLobby()
        {
            var matchLobbyHandler = new MatchLobbyHandler(CurrentPlayer);

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