Example #1
0
        public SkillPrefab(XElement element)
        {
            name = ToolBox.GetAttributeString(element, "name", "");

            var levelString = ToolBox.GetAttributeString(element, "level", "");

            if (levelString.Contains(","))
            {
                levelRange = ToolBox.ParseToVector2(levelString, false);
            }
            else
            {
                float skillLevel = float.Parse(levelString, System.Globalization.CultureInfo.InvariantCulture);
                levelRange = new Vector2(skillLevel, skillLevel);
            }
        }