/// <summary> /// Selects a Image Projector /// </summary> public void SelectObject(ImageProjector pImageProjector) { DeselectCurrentProjector(); _selectedImage = pImageProjector; _selectedButton = _imageObjects.FirstOrDefault(x => x.Value == pImageProjector).Key.GetComponent <Button>(); _selectedImage.ToggleSelected(true); _uiManager.ToggleSelectionPanel(true); _selectedButton.GetComponent <Image>().color = new Color(0.55f, 0.274f, 0.73f); SelectedImageChanged?.Invoke(this, new SelectedImageEventArgs(_selectedImage)); }
/// <summary> /// Selects a Image Projector /// </summary> public void SelectObject(GameObject pImageButton) { DeselectCurrentProjector(); _selectedImage = _imageObjects[pImageButton]; _selectedButton = pImageButton.GetComponent <Button>(); _selectedImage.ToggleSelected(true); _uiManager.ToggleSelectionPanel(true); _selectedButton.GetComponent <Image>().color = new Color(0.55f, 0.274f, 0.73f); SelectedImageChanged?.Invoke(this, new SelectedImageEventArgs(_selectedImage)); }