コード例 #1
0
ファイル: CharacterTable.cs プロジェクト: Swynfel/heirloom
 public void SetCharacter(CharacterEntity character)
 {
     if (NAME_PATH != "")
     {
         GetNode <Label>(NAME_PATH).Text = character.name;
     }
     if (APPEARANCE_PATH != "")
     {
         GetNode <CharacterAppearance>(APPEARANCE_PATH).data = character.appearance;
     }
     if (HEALTHBAR_PATH != "")
     {
         GetNode <HealthBar>(HEALTHBAR_PATH).SetHealth(character.health, character.maxHealth);
     }
     if (ELEMENTS_PATH != "")
     {
         GetNode <ElementalAffinityIcon>(ELEMENTS_PATH).SetAffinity(character.affinity);
     }
     if (SKILLS_PATH != "")
     {
         GetNode <SkillIconList>(SKILLS_PATH).SetCoreSkills(character);
     }
     if (TALENTS_PATH != "")
     {
         GetNode <SkillIconList>(TALENTS_PATH).SetTalents(character);
     }
     if (AGE_PATH != "")
     {
         GetNode <Label>(AGE_PATH).Text = character.AgeString();
     }
     if (BIRTH_PATH != "")
     {
         GetNode <Label>(BIRTH_PATH).Text = character.birth.ToString();
     }
     if (ACTION_PATH != "")
     {
         GetNode <Label>(ACTION_PATH).Text = character.Action().ToString();
     }
     if (LOVER_PATH != "")
     {
         GetNode <SmartText>(LOVER_PATH).BbcodeText = "[right]" + (character.lover?.MetaName() ?? "None") + "[/right]";
     }
     if (ITEM_PATH != "")
     {
         GetNode <SmartText>(ITEM_PATH).BbcodeText = "[right]" + (character.heldItem?.MetaName() ?? "None") + "[/right]";
     }
 }