Exemplo n.º 1
0
		public CoreTrack(XmlElement e, CoreSkeleton skeleton)
		{
			int boneId = int.Parse(e.GetAttribute("BONEID"));
			bone = skeleton.GetBone(boneId);

			keys = e.SelectElements("./KEYFRAME").Select(
				x => new Pair<float, Transform>(
					float.Parse(x.GetAttribute("TIME")),
					new Transform(
						Util.ReadQuaternion(x.SelectSingleNode("./ROTATION")),
						Util.ReadVector3(x.SelectSingleNode("./TRANSLATION"))))).ToList();
		}
        public void ReadFromXml(XmlElement element)
        {
            if (element == null)
                return;

            var currentList = element.ReadAttribute("current");

            var assemblyListGroups = from assemblyList in element.SelectElements("AssemblyList")
                                     let name = assemblyList.ReadAttribute("name")
                                     from assemblyFile in assemblyList.SelectElements("AssemblyFile")
                                     group XmlUtil.ReadLeafElementValue(assemblyFile) by name;

            var assemblyLists = assemblyListGroups.ToDictionary(k => k.Key, v => (IList<string>)v.ToList());

            manager = new AssemblyListManager(assemblyLists, currentList);
        }