public PortraitData getPortraitSprite(string character, string emote) { CharacterPortraitData charac = getCharacterPortrait(character); for (int i = 0; i < charac.portraits.Count; i++) { if (charac.portraits[i].emote == emote) { return(charac.portraits[i]); } } Debug.Log("Portrait '" + character + "' not found. Character '" + character + "' does not have emote '" + emote + "'."); Debug.Break(); return(null); }
CharacterPortraitData getCharacterPortrait(string character) { CharacterPortraitData charac = null; for (int i = 0; i < characters.Count; i++) { if (characters[i].characterID == character) { charac = characters[i]; } } if (charac == null) { Debug.Log("Portrait of character '" + character + "' not found. Character does not exist."); Debug.Break(); } return(charac); }
public string getPortraitTitle(string character) { CharacterPortraitData charac = getCharacterPortrait(character); return(charac.displayedName); }