예제 #1
0
        private static void loadAnimations(List<XmlNode
			> animations, Entity entity)
        {
            for (int i = 0; i < animations.Count; i++)
            {
                XmlNode a = animations[i];
                Animation animation = new Animation
                    ();
                animation.setId(XmlReader.getInt(a,"id" ));
                animation.setName(XmlReader.getAttribute(a,"name" ));
                animation.setLength(XmlReader.getInt(a,"length" ));
                animation.setLooping(XmlReader.getBool(a,"looping"));
                entity.getAnimation().Add(animation);
                loadMainline(XmlReader.getChildByName(a,"mainline"), animation);
                loadTimelines(XmlReader.getChildrenByName(a,"timeline"), animation);
            }
        }