示例#1
0
        public static new IrrNodeAnimatedMesh Get(IrrData data)
        {
            IrrNodeAnimatedMesh node = new IrrNodeAnimatedMesh();
            Copy(data, node);

            return node;
        }
示例#2
0
        public static void Copy(IrrData data, IrrNodeAnimatedMesh node)
        {
            foreach (IrrData child in data.Children)
            {
                if (string.IsNullOrEmpty(child.Attr.Name))
                    continue;

                switch (child.Attr.Name.ToLower())
                {
                    case "automaticculling":
                        node.AutomaticCulling = CullingType.Box;
                        break;
                    case "debugdatavisible":
                        node.DebugDataVisible = (int)child.Attr.Value;
                        break;
                    case "isdebugobject":
                        node.IsDebugObject = (bool)child.Attr.Value;
                        break;
                    case "mesh":
                        node.Mesh = child.Attr.Value as string;
                        break;
                    case "looping":
                        node.Looping = (bool)child.Attr.Value;
                        break;
                    case "readonlymaterials":
                        node.ReadOnlyMaterials = (bool)child.Attr.Value;
                        break;
                    case "framespersecond":
                        node.FramesPerSecond = (float)child.Attr.Value;
                        break;
                }
            }

            IrrNode.Copy(data, node);
        }