Beispiel #1
0
        public override void Load(string filePath)
        {
            base.Load(filePath);

            foreach (var folder in Directory.GetDirectories(filePath))
            {
                string folderName = Path.GetFileNameWithoutExtension(folder);
                switch (folderName.ToLower())
                {
                case "dzs":
                {
                    string fileName = Path.Combine(folder, "stage.dzs");
                    if (File.Exists(fileName))
                    {
                        LoadLevelEntitiesFromFile(fileName);
                    }
                }
                break;

                case "bmd":
                case "bdl":
                {
                    m_skybox = new WSkyboxNode(m_world);
                    m_skybox.LoadSkyboxModelsFromFixedModelList(folder);
                    m_skybox.SetParent(this);
                }
                break;
                }
            }
        }
Beispiel #2
0
        private void LoadStageModels(string filepath)
        {
            m_skybox = new WSkyboxNode(m_world);
            m_skybox.LoadSkyboxModelsFromFixedModelList(filepath);
            m_skybox.SetParent(this);

            CategoryDOMNode meshCategory = new CategoryDOMNode("Models", m_world);

            meshCategory.SetParent(this);

            string[] files = Directory.GetFiles(filepath, "*.bdl");

            foreach (string str in files)
            {
                J3D mesh = LoadModel(filepath, Path.GetFileNameWithoutExtension(str));
                if (mesh != null)
                {
                    J3DNode j3d_node = new J3DNode(mesh, m_world, str);
                    j3d_node.IsRendered = false;
                    j3d_node.SetParent(meshCategory);
                }
            }
        }