more cleanup
This commit is contained in:
parent
af441e772b
commit
77832db39d
28 changed files with 45 additions and 105 deletions
|
@ -1,6 +1,4 @@
|
|||
// using MonoGame.Extended;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using Microsoft.Xna.Framework.Content;
|
||||
using Microsoft.Xna.Framework;
|
||||
|
@ -12,10 +10,10 @@ namespace Sledgemapper
|
|||
{
|
||||
public static Dictionary<string, T> LoadContentFolder<T>(this ContentManager contentManager, string contentFolder)
|
||||
{
|
||||
DirectoryInfo dir = new DirectoryInfo(contentManager.RootDirectory + "/" + contentFolder);
|
||||
DirectoryInfo dir = new(contentManager.RootDirectory + "/" + contentFolder);
|
||||
if (!dir.Exists)
|
||||
throw new DirectoryNotFoundException();
|
||||
Dictionary<string, T> result = new Dictionary<string, T>();
|
||||
Dictionary<string, T> result = new();
|
||||
|
||||
FileInfo[] files = dir.GetFiles("*.*");
|
||||
foreach (FileInfo file in files)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue