public void setCurrentMap(MapSettings mapSettings) { currentMap = mapSettings; if (Network.isServer) { currentMap.imPlayer(CurrentPlayerId); currentPlayer = currentMap.players[CurrentPlayerId]; } }
public void PrepareStart() { startCamera = NetworkController.instance.currentPlayer.cameraStartingLocation; endCamera = NetworkController.instance.currentPlayer.superHedronCollider.transform.position; endCamera += new Vector3(0, 75, 0); MapSettings mapSettings = NetworkController.instance.currentMap; for (int playerId = 0; playerId < mapSettings.players.Length; playerId++) { MapPlayerSettings playerSettings = mapSettings.players[playerId]; makeAgent(playerSettings.superHedronCollider.transform, 40, playerId); foreach (var spawner in playerSettings.spawnners) { makeAgent(spawner.transform, 20, playerId); } } InPrepareStart = true; }