public void SetBody(NewGameUnitButton newGameUnitButton) { if (selectedUnitButton != null && selectedUnitButton != newGameUnitButton) { selectedUnitButton.DeSelect(); } selectedUnitButton = newGameUnitButton; }
public void SetUnitProfile(UnitProfile newUnitProfile) { //Debug.Log("NewGameMecanimCharacterPanelController.SetUnitProfile(" + (newUnitProfile == null ? "null" : newUnitProfile.DisplayName) + ")"); // deselect old button if (selectedUnitButton != null && selectedUnitButton.UnitProfile != newUnitProfile) { selectedUnitButton.DeSelect(); selectedUnitButton.UnHighlightBackground(); } // select new button for (int i = 0; i < optionButtons.Count; i++) { if (optionButtons[i].UnitProfile == newUnitProfile) { selectedUnitButton = optionButtons[i]; uINavigationControllers[0].SetCurrentIndex(i); optionButtons[i].HighlightBackground(); } } }