Exemplo n.º 1
0
 private void MakePrefab(Animation animation, GameObject root)
 {
     foreach(var mainKey in animation.MainlineKeys)
     {
         MakePrefab(mainKey, root);
     }
 }
Exemplo n.º 2
0
        protected virtual void Parse(XmlElement element, Animation animation)
        {
            Animation = animation;
            Name = element.GetString("name", "");

            ObjectType = ObjectType.Parse(element);

            var children = element.GetElementsByTagName(TimelineKey.XmlKey);
            foreach (XmlElement childElement in children)
            {
                keys.Add(GetKey(childElement));
            }
        }
Exemplo n.º 3
0
 protected virtual void Parse(XmlElement element, Animation animation)
 {
     //Get elements
     //TODO: Ensure proper ordering of elements to prevent dependency errors
     var children = element.ChildNodes;
     foreach(XmlNode child in children)
     {
         XmlElement childElement = child as XmlElement;
         if(childElement != null)
         {
             switch(childElement.Name)
             {
                 case BoneRef.XmlKey:
                     refs.Add(new BoneRef(childElement, animation, this));
                     break;
                 case ObjectRef.XmlKey:
                     refs.Add(new ObjectRef(childElement, animation, this));
                     break;
             }
         }
     }
 }
Exemplo n.º 4
0
 public ObjectRef(XmlElement element, Animation animation, MainlineKey parentKey)
     : base(element, animation, parentKey)
 {
 }
Exemplo n.º 5
0
 public Timeline(XmlElement element, Animation animation)
     : base(element)
 {
     Parse (element, animation);
 }
Exemplo n.º 6
0
 public MainlineKey(XmlElement element, Animation animation)
     : base(element)
 {
     Parse(element, animation);
 }