private string ShortStatBoostDisplay(CharacterStatData statData, CharacterData characterData) { int level = 0; if (characterData.statBoostAmount == 1) { level = 1; } else if (characterData.statBoostAmount == 2) { level = 2; } else { level = 3; } string pluses = "+"; if (level == 2) { pluses = "++"; } else if (level == 3) { pluses = "+++"; } return(LocalizedText.Get(statData.name) + pluses); }
private void SetupLabelInfo(CharacterData characterData) { string nameText = LocalizedText.Get(characterData.characterName) + " <color=#AAAAAA>" + characterData.age.ToString() + "</color>"; string taglineText = LocalizedText.Get(characterData.tagline); System.Array.ForEach(nameLabels, (label) => label.text = nameText); System.Array.ForEach(taglineLabels, (label) => label.text = taglineText); string spellPrefix = "Spell: "; string quirkPrefix = "Quirk: "; string passiveBoostPrefix = "Passive Boost: "; if (characterData.spell != null) { System.Array.ForEach(spellImages, (image) => image.sprite = characterData.spell.icon); System.Array.ForEach(spellTitleLabels, (label) => label.text = (label.rectTransform.sizeDelta.x > 150 ? spellPrefix : "") + LocalizedText.Get(characterData.spell.friendlyName)); System.Array.ForEach(spellDescLabels, (label) => label.text = LocalizedText.Get(characterData.spell.description)); } if (characterData.quirk != null) { System.Array.ForEach(quirkImages, (image) => image.sprite = characterData.quirk.icon); System.Array.ForEach(quirkTitleLabels, (label) => label.text = (label.rectTransform.sizeDelta.x > 150 ? quirkPrefix : "") + LocalizedText.Get(characterData.quirk.friendlyName)); System.Array.ForEach(quirkDescLabels, (label) => label.text = LocalizedText.Get(characterData.quirk.description)); } CharacterStatData statData = Game.instance.characterStatInfo.DataForStat(characterData.statBoost); System.Array.ForEach(boostImages, (image) => image.sprite = statData.icon); System.Array.ForEach(boostTitleLabels, (label) => label.text = label.rectTransform.sizeDelta.x > 150 ? passiveBoostPrefix + LocalizedText.Get(statData.name) + " + " + characterData.statBoostAmount.ToString() : ShortStatBoostDisplay(statData, characterData)); System.Array.ForEach(boostDescLabels, (label) => label.text = LocalizedText.Get(statData.description)); bioLabel.text = LocalizedText.Get(characterData.bio); ApplyPigLatinIfNecessary(); }