Beispiel #1
0
 public static MouthUpdater FromXml(string location)
 {
     try {
         UpdateMap returnMap = new UpdateMap(new Dictionary<uint, MouthUpdate>());
         XElement updateMap = XElement.Load(location);
         List<XElement> updateData = updateMap.Elements("MapElement").ToList();
         foreach(XElement update in updateData) {
             uint timeStep = UInt32.Parse(update.Attribute("TimeStep").Value);
             returnMap[timeStep] = MouthUpdate.FromXml(update);
         }
         return new MouthUpdater(updateMap.Attribute("Name").Value, returnMap);
     } catch(Exception ex) {
         log.Error("Unable to load mouth", ex);
         return new MouthUpdater("Test", new UpdateMap(new Dictionary<uint,MouthUpdate>()));
     }
 }
Beispiel #2
0
 public MouthUpdater(string name, UpdateMap map)
 {
     Name = name;
     this.map = map;
 }