Пример #1
0
 /// <summary>
 /// Gets the portrait sprite at a specific index, where <c>1</c> is the default
 /// portrait and <c>2</c>+ are the alternate portraits. Checks the actor's
 /// textures and sprites.
 /// </summary>
 /// <returns>The portrait image.</returns>
 /// <param name="i">The index number of the portrait image.</param>
 public Sprite GetPortraitSprite(int i)
 {
     if (i == 1)
     {
         return(UITools.GetSprite(portrait, spritePortrait));
     }
     else
     {
         int index = i - 2;
         return(UITools.GetSprite(
                    (0 <= index && index < alternatePortraits.Count) ? alternatePortraits[index] : null,
                    (0 <= index && index < spritePortraits.Count) ? spritePortraits[index] : null));
     }
 }
Пример #2
0
 public Sprite GetPortraitSprite()
 {
     return(UITools.GetSprite(portrait, spritePortrait));
 }