private void Start() { //if (evolution == null) return; mateSprite.sprite = Util.RandomFromArray(mateSpriteOptions); evolution = new Evolution(); evolution.GenerateEvolution(); titleTxt.SetText(""); // Evo Name"); hpTxt.SetText(AddPlus(evolution.hp)); spTxt.SetText(AddPlus(evolution.sp)); strTxt.SetText(AddPlus(evolution.str)); agiTxt.SetText(AddPlus(evolution.agi)); if (evolution.action != null) { actionTxt.SetText(evolution.action.abilityName); } else { actionTxt.SetText(""); } if (evolution.trait != null) { traitTxt.SetText(evolution.trait.abilityName); } else { traitTxt.SetText(""); } }
void GenerateMenu(int numOptions) { for (int i = 0; i < numOptions; i++) { EvolutionMenuView menuItem = Instantiate(menuViewTemplate, this.transform); menuItem.transform.localPosition = new Vector3(-4f + (i * 2f), 0f, 1f); menuItem.transform.localScale = new Vector3(.75f, .75f, 1f); Evolution evolution = new Evolution(); evolution.GenerateEvolution(); menuItem.evolution = evolution; menuItems.Add(menuItem); } TimeControl.StartTimer(.1f, () => UpdateSelection()); }