Beispiel #1
0
    public void PlayerDeath(PlayerSpaceshipController player)
    {
        if (!_isEndGame)
        {
            alivePlayers.Remove(player);
            Debug.Log($"[PlayerManager] Player died: {player.PlayerId}");
            deadPlayers.Add(SpawnPlayerInDisc(player.PlayerId, player.color));

            if (alivePlayers.Count == 1)
            {
                EndGameManager.StartEndGame(alivePlayers.SingleOrDefault(), deadPlayers, spawnpoints[4]);
                _isEndGame = true;
            }
        }
        else
        {
            EndGameManager.DiscWin();
        }
    }