public void hover(int featureOption) { if (currentFeature != null) { return; } descriptionField.text = ClassFeatures.getDescription(features[featureOption]); nameField.text = ClassFeatures.getName(features[featureOption]); }
public void setDescription(int featureOption) { descriptionField.text = ClassFeatures.getDescription(features[featureOption]); nameField.text = ClassFeatures.getName(features[featureOption]); currentFeature = features[featureOption]; selectedFeature = featureOption; if (features.Length > 1) { confirmButton.interactable = true; } }
public void format(ClassFeature featureA, ClassFeature featureB) { featureButtonA.gameObject.SetActive(true); featureButtonB.gameObject.SetActive(true); confirmButton.gameObject.SetActive(true); backButton.gameObject.SetActive(false); features[0] = featureA; features[1] = featureB; featureButtonA.transform.GetChild(0).GetComponent <Text>().text = ClassFeatures.getName(featureA); featureButtonB.transform.GetChild(0).GetComponent <Text>().text = ClassFeatures.getName(featureB); }
private void assignClassFeatures() { CharacterProgress characterProgress = character.characterSheet.characterProgress; int characterLevel = characterProgress.getCharacterLevel(); // ClassFeature[] features = characterProgress.getCharacterClass().getPossibleFeatures(characterLevel); ClassFeature[] features = characterProgress.getClassFeatures(); GameObject featureList = featuresPanel.transform.FindChild("Panel - Feature List").gameObject; GameObject exampleText = featureList.transform.GetChild(0).gameObject; for (int n = featureList.transform.childCount - 1; n > 0; n--) { GameObject.Destroy(featureList.transform.GetChild(n).gameObject); } foreach (ClassFeature feature in features) { GameObject newText = (GameObject)Instantiate(exampleText); newText.transform.SetParent(featureList.transform, false); newText.GetComponent <Text>().text = ClassFeatures.getName(feature); } // exampleText.SetActive(false); Destroy(exampleText); }