예제 #1
0
        private void _UpdateHeroInfo()
        {
            SkillNames.Clear();
            heroNameChars.Clear();

            if (Hero != null)
            {
                string name = Application.Current.TryFindResource(string.Format("Hero.{0}.Name", Hero.Name)) as string;
                if (name != null)
                {
                    foreach (var heroChar in name)
                    {
                        if (heroNameChars.Count > 0 && (char.IsUpper(heroChar) || char.IsLower(heroChar)) &&
                            (char.IsUpper(heroNameChars.Last().Last()) || char.IsUpper(heroNameChars.Last().Last())))
                        {
                            heroNameChars[heroNameChars.Count - 1] += heroChar;
                        }
                        else
                        {
                            heroNameChars.Add(heroChar.ToString());
                        }
                    }
                }
                foreach (var skill in Hero.Skills)
                {
                    SkillNames.Add(skill.GetType().Name);
                }
            }
        }
예제 #2
0
 internal void UpdateSkillNames()
 {
     SkillNames.Clear();
     foreach (var skill in SkillCommands)
     {
         SkillNames.Add(skill.Skill.GetType().Name);
     }
 }
예제 #3
0
 public void AddSkillName(string name)
 {
     SkillNames.Add(name);
 }