Beispiel #1
0
        // PRIVATE

        private void SetLobbyData()
        {
            if (_lobbyData.Public)
            {
                _lobbyData.SetRandomName();
            }
            _lobbyData.GameStarted = false;
            _lobbyData.CanBeJoined = true;
            _lobbyData.SetRandomGamemode();
            _lobbyData.SetRandomMap();

            VerifyLobbyDataSanity();
            SWMatchmaking.SetLobbyData(_lobbyData);
        }
Beispiel #2
0
        public void CreateRandomGame()
        {
            _lobbyData.SetRandomGamemode();
            PopulateMapList();
            _lobbyData.SetRandomMap();
            SWMatchmaking.SetLobbyData(_lobbyData);
            Debug.Log("Creating random game for " + _lobbyData.ChosenGamemode);
            SWMatchmaking.CreateLobby();

            if (OnGameCreated != null)
            {
                OnGameCreated.Invoke();
            }
        }