/// <summary> /// Shows the selected vehicle from the LobbyManager Available Vehicles /// </summary> protected virtual void ShowSelectedVehicle() { if (_currentVehicleIndex != -1) { VehicleInformation info = _localLobbyManager.AvailableVehiclesPrefabs[_currentVehicleIndex].GetComponent <VehicleInformation>(); VehicleText.text = info.LobbyName; VehicleImage.sprite = info.lobbySprite; _localLobbyManager.registerLobbyPlayer(Position, _currentVehicleIndex); } }
/// <summary> /// Shows the selected vehicle. /// </summary> protected virtual void ShowSelectedVehicle() { VehicleInformation info = OnlineLobbyManager.Instance.AvailableVehiclesPrefab[_currentVehicleSelected].GetComponent <VehicleInformation>(); VehicleText.text = info.LobbyName; VehicleImage.sprite = info.lobbySprite; // Server stores vehicle name of object instantiation if (isServer) { VehicleName = VehicleText.text; } }