// Start is called before the first frame update void Start() { countdownTimer = COUNTDOWN_LENGTH; curEvent = EVENT_NONE; lastEvent = EVENT_NONE; eventParams = 0; DontDestroyOnLoad(this.gameObject); if (isServer) { playerObjects = new GameObject[] { null, null, null, null, null, null, null, null }; } else { playerObjects = null; networkManager = null; } spawnManager = null; localClient = GameObject.FindObjectOfType <NeonHeightsLobbyClient2>(); connectionId = -1; numberOfPlayers = 0; nextLevel = "random"; gameStarted = false; playerConnectionIDs.Callback += OnPlayerConnectionIDsUpdated; //SyncList.Callback is called the variable is changed //on the server }
public void SetNetworkManager(NeonHeightsLobbyManager networkManager) { print("Setting network Manager"); this.networkManager = networkManager; }