AddModel() 공개 메소드

public AddModel ( ModelModel model ) : void
model ModelModel
리턴 void
예제 #1
0
        private static void ReadContentFolder(GameModeModel model, string folderPath)
        {
            var texturesPath = Path.Combine(folderPath, FolderNameContent, FolderNameTextures);
            FileSystem.GetFilesRecursive(texturesPath, file => model.AddTexture(new TextureModel(texturesPath, file)));

            var modelPath = Path.Combine(folderPath, FolderNameContent, FolderNameModels);
            FileSystem.GetFilesOfFolderRecursive(modelPath, files =>
            {
                if (files.Any(f => (Path.GetExtension(f) ?? "").Equals(".obj", StringComparison.OrdinalIgnoreCase)))
                {
                    model.AddModel(new ModelModel(modelPath, files));
                }
            });
        }
예제 #2
0
        private static void ReadContentFolder(GameModeModel model, string folderPath)
        {
            var texturesPath = Path.Combine(folderPath, FolderNameContent, FolderNameTextures);

            FileSystem.GetFilesRecursive(texturesPath, file => model.AddTexture(new TextureModel(texturesPath, file)));

            var modelPath = Path.Combine(folderPath, FolderNameContent, FolderNameModels);

            FileSystem.GetFilesOfFolderRecursive(modelPath, files =>
            {
                if (files.Any(f => (Path.GetExtension(f) ?? "").Equals(".obj", StringComparison.OrdinalIgnoreCase)))
                {
                    model.AddModel(new ModelModel(modelPath, files));
                }
            });
        }