Esempio n. 1
0
        private IEnumerator CoroGameOver(float wait, bool gameWon)
        {
            // wait 5 seconds for game animations to finish
            yield return(new WaitForSeconds(wait));

            GameStateRelay.SetRelayObject(gameWon);
            MLAPI.SceneManagement.NetworkSceneManager.SwitchScene("PostGame");
        }
Esempio n. 2
0
        private void SaveLobbyResults()
        {
            LobbyResults lobbyResults = new LobbyResults();

            foreach (CharSelectData.LobbyPlayerState playerInfo in CharSelectData.LobbyPlayers)
            {
                lobbyResults.Choices[playerInfo.ClientId] = new LobbyResults.CharSelectChoice(playerInfo.PlayerNum,
                                                                                              CharSelectData.LobbySeatConfigurations[playerInfo.SeatIdx].Class,
                                                                                              CharSelectData.LobbySeatConfigurations[playerInfo.SeatIdx].CharacterArtIdx);
            }
            GameStateRelay.SetRelayObject(lobbyResults);
        }
Esempio n. 3
0
 /// <summary>
 /// Temp code to spawn an enemy
 /// </summary>
 private void Update()
 {
     if (Input.GetKeyDown(KeyCode.E))
     {
         var newEnemy = Instantiate(m_EnemyPrefab);
         newEnemy.SpawnWithOwnership(NetworkManager.Singleton.LocalClientId);
     }
     if (Input.GetKeyDown(KeyCode.B))
     {
         var newEnemy = Instantiate(m_BossPrefab);
         newEnemy.SpawnWithOwnership(NetworkManager.Singleton.LocalClientId);
     }
     if (Input.GetKeyDown(KeyCode.Q))
     {
         GameStateRelay.SetRelayObject(false);
         MLAPI.SceneManagement.NetworkSceneManager.SwitchScene("PostGame");
     }
 }