Exemplo n.º 1
0
        public static ElBlendPart Parse(ElData data)
        {
            var rt = new ElBlendPart
            {
                baseData = data,
            };

            foreach (var i in data.Children)
                switch (i.Name)
                {
                    case "BoneName":
                        rt.BoneName = i.Values.First().Trim('"');

                        break;
                    case "TransformIndex":
                        rt.TransformIndex = int.Parse(i.Values.First());

                        break;
                    case "VertexBlend":
                        foreach (var j in i.Children)
                        {
                            var sl = j.Values.First().Split(',');

                            rt.VertexBlend.Add(int.Parse(sl[0]), float.Parse(sl[1]));
                        }

                        break;
                }

            return rt;
        }
Exemplo n.º 2
0
        public static ElBlendPart Parse(ElData data)
        {
            var rt = new ElBlendPart
            {
                baseData = data,
            };

            foreach (var i in data.Children)
            {
                switch (i.Name)
                {
                case "BoneName":
                    rt.BoneName = i.Values.First().Trim('"');

                    break;

                case "TransformIndex":
                    rt.TransformIndex = int.Parse(i.Values.First());

                    break;

                case "VertexBlend":
                    foreach (var j in i.Children)
                    {
                        var sl = j.Values.First().Split(',');

                        rt.VertexBlend.Add(int.Parse(sl[0]), float.Parse(sl[1]));
                    }

                    break;
                }
            }

            return(rt);
        }