AddModel() public method

public AddModel ( ModelModel model ) : void
model ModelModel
return void
コード例 #1
0
ファイル: GameModeModel.cs プロジェクト: nilllzz/Pokemon3D
        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
ファイル: GameModeModel.cs プロジェクト: JoNMii/Pokemon3D
        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));
                }
            });
        }