public override void OnServerDisconnect(NetworkConnection conn) { if (conn.identity != null) { _polePositionManager.RemovePlayer(conn.identity.GetComponent <PlayerInfo>()); } base.OnServerDisconnect(conn); }
/* * Al destruirse esta instancia, debe eliminarse de la lista de jugadores */ private void OnDestroy() { m_PolePositionManager.RemovePlayer(m_PlayerInfo); }
public override void OnStopClient() { m_PolePositionManager.RemovePlayer(m_PlayerInfo); base.OnStopClient(); NetworkServer.Destroy(this.gameObject); }