Exemplo n.º 1
0
 public SecondaryAttributesViewer(ICharacter character, Anchor anchor, float width, float height) : base(anchor, width, height)
 {
     AddChild(new TitleCustomText("Вторичные характеристики"));
     AddChild(new VerticalSpace(10));
     foreach (var type in (SecondaryType[])Enum.GetValues(typeof(SecondaryType)))
     {
         AddChild(new VerticalSpace(3));
         var textPointer = new EnumTextPointer <SecondaryType>(type);
         AddChild(new CustomText(Anchor.AutoLeft, $"{textPointer}:  {character.Secondary[type].Value}"));
     }
 }
Exemplo n.º 2
0
 public ProtectionViewer(ICharacter character, Anchor anchor, float width, float height) : base(anchor, width, height)
 {
     AddChild(new TitleCustomText("Защита"));
     AddChild(new VerticalSpace(10));
     foreach (var type in (DamageType[])Enum.GetValues(typeof(DamageType)))
     {
         AddChild(new VerticalSpace(3));
         var textPointer = new EnumTextPointer <DamageType>(type)
         {
             GrammaticalCase = GrammaticalCase.Genitive,
         };
         AddChild(new CustomText(Anchor.AutoLeft, $"Защита от {textPointer}:  {character.Protection[type].Value}"));
     }
 }