//Start private void Start() { DontDestroyOnLoad(this.gameObject); if (isServer) { if (isLocalPlayer) { LocalInstance = this; Player1Instance = this; this.name = name + "_Player1"; } else { Player2Instance = this; this.name = name + "_Player2"; } } else { if (isLocalPlayer) { LocalInstance = this; Player2Instance = this; this.name = name + "_Player2"; } else { Player1Instance = this; this.name = name + "_Player1"; } } }
private void ChangeInterval(Player player) { if (player == team) { interval = 1f / LevelController.Instance.spawnLemmingsPerSecondRates[LNetworkPlayer.GetInstanceByTeam(player).spawnRateIndex]; Debug.Log("interval on " + player.ToString() + " changed to " + interval.ToString()); } }