コード例 #1
0
ファイル: AvatarLoader.cs プロジェクト: dingzheng8866/GEngine
        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);
            }
        }
コード例 #2
0
        public AvatarActionImageAnimation GetAvatarActionImageAnimation(string action)
        {
            AvatarActionImageAnimation animation = null;

            if (!actions.TryGetValue(action, out animation))
            {
                animation = null;
            }
            Debuger.Assert(animation);
            return(animation);
        }
コード例 #3
0
ファイル: AvatarLoader.cs プロジェクト: dingzheng8866/GEngine
        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);
        }
コード例 #4
0
 public void SetActionImageAnimation(AvatarActionImageAnimation actionAnimation)
 {
     actions[actionAnimation.action] = actionAnimation;
 }