123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- using System.Collections.Generic;
- using System.Xml;
- using OpenMetaverse;
- namespace OpenSim.Region.Framework.Scenes
- {
- public class AvatarAnimations
- {
- public Dictionary<string, UUID> AnimsUUID = new Dictionary<string, UUID>();
- public Dictionary<UUID, string> AnimsNames = new Dictionary<UUID, string>();
- public Dictionary<UUID, string> AnimStateNames = new Dictionary<UUID, string>();
- public AvatarAnimations()
- {
- using (XmlTextReader reader = new XmlTextReader("data/avataranimations.xml"))
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(reader);
- foreach (XmlNode nod in doc.DocumentElement.ChildNodes)
- {
- if (nod.Attributes["name"] != null)
- {
- string name = (string)nod.Attributes["name"].Value;
- UUID id = (UUID)nod.InnerText;
- string animState = (string)nod.Attributes["state"].Value;
- AnimsUUID.Add(name, id);
- AnimsNames.Add(id, name);
- if (animState != "")
- AnimStateNames.Add(id, animState);
- }
- }
- }
- }
- }
- }
|