public void SelectDrone(ClientDrone drone) { _selectedDrone = drone; _canvas.SetActiveDrone(drone); SelectedDroneChanged?.Invoke(drone); }
private void OnSelectedDroneChanged(ClientDrone selected) { if (this == selected) { _display.sharedMaterial = _selectedMaterial; } else { _display.sharedMaterial = IsOwned ? _playerMaterial : _defaultMaterial; } }
public void SetActiveDrone(ClientDrone drone) { _droneText.gameObject.SetActive(true); if (drone.IsOwned) { _droneText.text = $"Your drone"; } else { _droneText.text = $"Drone belonging to {drone.Owner}"; } }