/// <summary> /// Handles player death notification from the death mesh and passes the message forward to clients via RPC, logs the death onto the leaderboard. /// </summary> /// <param name="playerManager">The playerManager of the dieing player</param> /// public void handlePlayerDeath(V2PlayerManager playerManager) { playerManager.RpcDie(); // TODO: Handle leaderboard. StartCoroutine(handlePlayerSpawn(playerManager)); // maybe havea coroutine for handle player LMS death, which only respawns once all are dead? }
public void handlePlayerDeath(V2PlayerManager playerManager) { playerManager.RpcDie(); PlayersAlive--; if (PlayersAlive == 1) { for (int i = 0; i < Players.Length; i++) { if (Players[i].isDead == false) { Debug.Log(Players[i].name); } } killAllAlive(); spawnAll(); } }