public override void OnStopClient() { //If We The Server Or Not Has Authority //Do not Subscribe If We Do not Have Authority if (isClientOnly) { ((RTSNetworkManager)NetworkManager.singleton).Players.Remove(this); ClientOnInfoUpdated?.Invoke(); } else { ClientOnInfoUpdated?.Invoke(); return; } if (!hasAuthority) { return; } Unit.AuthorityOnUnitSpawned -= AuthorityHandleUnitSpawned; Unit.AuthorityOnUnitDeSpawned -= AuthorityHandleUnitDeSpawned; Building.AuthorityOnBuildingSpawned -= AuthorityHandleBuildingSpawned; Building.AuthorityOnBuildingDeSpawned -= AuthorityHandleBuildingDeSpawned; }
public override void OnStopClient() { if (!NetworkServer.active) { ((NetworkMan)NetworkManager.singleton).lobbyPlayers.Remove(this); } ClientOnInfoUpdated?.Invoke(); base.OnStopClient(); }
public override void OnStopClient() { ClientOnInfoUpdated?.Invoke(); if (!isClientOnly) { return; } ((SwitchNetworkManager)NetworkManager.singleton).Players.Remove(this); }
public override void OnStopClient() { ClientOnInfoUpdated?.Invoke(); if (!isClientOnly) { return; } ((RTSNetworkManager)NetworkManager.singleton).Players.Remove(this); if (!hasAuthority) { return; } Unit.AuthoryOnUnitSpawn -= AuthoryHandleUnitSpawn; Unit.AuthoryOnUnitDespawn -= AuthoryHandleUnitDespawn; Building.AuthorityOnBuildingSpawn -= AuthorityHandleBuildingSpawn; Building.AuthorityOnBuildingDespawn -= AuthorityHandleBuildingDespawn; }
public override void OnStopClient() { ClientOnInfoUpdated?.Invoke(); if (!isClientOnly) { return; } ((MyNetworkManager)NetworkManager.singleton).Players.Remove(this); if (!hasAuthority) { return; } Unit.AuthorityOnUnitSpawned -= AuthorityAddUnitToList; Unit.AuthorityOnUnitDespawned -= AuthorityRemoveUnitFromList; Building.AuthorityOnBuildingSpawned -= AuthorityAddBuildingToList; Building.AuthorityOnBuildingDespawned -= AuthorityRemoveBuildingFromList; }
private void ClientHandleDisplayNameUpdated(string oldDisplayName, string newDisplayName) { ClientOnInfoUpdated?.Invoke(); }