public void CmdExitShop() { RpcDeactivateFinishedPlayer(); AllPlayerManager.playerFinished(netId); if (AllPlayerManager.isPlayersToEndReached()) //??? { StartCoroutine(ServerGM.finishLevel()); } }
public void CmdExitLevel() { RpcKeyUsed(); RpcDeactivateFinishedPlayer(); AllPlayerManager.playerFinished(netId); if (AllPlayerManager.isPlayersToEndReached()) //end level { StartCoroutine(ServerGM.finishLevel()); } else { StartCoroutine(ServerGM.givePlayerToObserve(this)); } }
public static void handlePlayerDied(Player p) { AllPlayerManager.playerDied(p.netId);//update arrays; update player counts; allGMInst.RpcUpdatePlayerCountFrame(AllPlayerManager.playersActive, AllPlayerManager.playersFinished, AllPlayerManager.playersToNextLevel); if (AllPlayerManager.playersFinished + AllPlayerManager.playersActive > 0) { if (AllPlayerManager.isPlayersToEndReached()) //end level { instanceSelf.StartCoroutine(ServerGM.finishLevel()); } else { instanceSelf.StartCoroutine(ServerGM.givePlayerToObserve(p)); } } else //game over { allGMInst.RpcFinishGame(); } }