private static void ParseAvatarActions(AvatarInfo ai, XmlElement root) { XmlNodeList list = root.GetElementsByTagName("action"); foreach (XmlElement node in list) { AvatarActionImageAnimation aia = ParseAvatarAction(node); ai.SetActionImageAnimation(aia); } }
public AvatarActionImageAnimation GetAvatarActionImageAnimation(string action) { AvatarActionImageAnimation animation = null; if (!actions.TryGetValue(action, out animation)) { animation = null; } Debuger.Assert(animation); return(animation); }
private static AvatarActionImageAnimation ParseAvatarAction(XmlElement node) { string actionName = node.GetAttribute("name"); AvatarActionImageAnimation animationList = new AvatarActionImageAnimation(actionName); XmlNodeList list = node.GetElementsByTagName("animation"); foreach (XmlElement animationNode in list) { ImageAnimation ia = ParseAnimation(animationNode); animationList.AddAvatarActionDirectionAnimation(ia); } return(animationList); }
public void SetActionImageAnimation(AvatarActionImageAnimation actionAnimation) { actions[actionAnimation.action] = actionAnimation; }