Ejemplo n.º 1
0
        public static AnimationGraph AnimationGraphFromStream(System.IO.BinaryReader br)
        {
            int[] indexes = new int[br.ReadInt32()];
            for (int i = 0; i < indexes.Length; i++)
                indexes[i] = br.ReadInt32();
            string description = br.ReadPackString();
            AnimationGraph AGrf = new AnimationGraph(description, indexes);

            int lenth = br.ReadInt32();
            AGrf.nodes = new AnimationNode[lenth];
            for (int i = 0; i < lenth; i++)
            {
                AnimationNode node = AnimationNode.AnimationNodeFromStream(br);
                AGrf.nodes[i] = node;
            }
            for (int i = 0; i < AGrf.nodes.Length; i++)
                for (int j = 0; j < AGrf.nodes[i].nodeEvents.Length; j++)
                {
                    AGrf.nodes[i].nodeEvents[j].associatedNode = AGrf.FindNodeWithName(AGrf.nodes[i].nodeEvents[j].associatedNodeName);
                    AGrf.nodes[i].nodeEvents[j].parentNode = AGrf.FindNodeWithName(AGrf.nodes[i].nodeEvents[j].parentName);
                }
            return AGrf;
        }
Ejemplo n.º 2
0
 public CharacterPart(AnimationGraph _baseGraph)
 {
     animGraph = _baseGraph;
 }