Applied gitignore
This commit is contained in:
@ -1,54 +1,54 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
using TransportGame.Model;
|
||||
using TransportGame.Utils;
|
||||
|
||||
namespace TransportGame.Business
|
||||
{
|
||||
public static class BiomeManager
|
||||
{
|
||||
private static List<Biome> biomes = new List<Biome>();
|
||||
|
||||
/// <summary>
|
||||
/// Gets all the loaded biomes
|
||||
/// </summary>
|
||||
public static IEnumerable<Biome> Biomes
|
||||
{
|
||||
get
|
||||
{
|
||||
return biomes;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Loads the biomes from the Biome directory.
|
||||
/// </summary>
|
||||
public static void LoadBiomes()
|
||||
{
|
||||
foreach (var file in Directory.GetFiles(ConfigurationManager.BiomeDirectory, "*.xml", SearchOption.AllDirectories))
|
||||
{
|
||||
try
|
||||
{
|
||||
// Open file
|
||||
var stream = File.OpenRead(file);
|
||||
|
||||
// Try to deserialize biome
|
||||
XmlSerializer serializer = new XmlSerializer(typeof(Biome));
|
||||
var biome = (Biome)serializer.Deserialize(stream);
|
||||
|
||||
// Add it to biome list
|
||||
biomes.Add(biome);
|
||||
Logger.Info("Loaded biome '{0}' from file '{1}'.", biome.Name, file);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Exception(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
using TransportGame.Model;
|
||||
using TransportGame.Utils;
|
||||
|
||||
namespace TransportGame.Business
|
||||
{
|
||||
public static class BiomeManager
|
||||
{
|
||||
private static List<Biome> biomes = new List<Biome>();
|
||||
|
||||
/// <summary>
|
||||
/// Gets all the loaded biomes
|
||||
/// </summary>
|
||||
public static IEnumerable<Biome> Biomes
|
||||
{
|
||||
get
|
||||
{
|
||||
return biomes;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Loads the biomes from the Biome directory.
|
||||
/// </summary>
|
||||
public static void LoadBiomes()
|
||||
{
|
||||
foreach (var file in Directory.GetFiles(ConfigurationManager.BiomeDirectory, "*.xml", SearchOption.AllDirectories))
|
||||
{
|
||||
try
|
||||
{
|
||||
// Open file
|
||||
var stream = File.OpenRead(file);
|
||||
|
||||
// Try to deserialize biome
|
||||
XmlSerializer serializer = new XmlSerializer(typeof(Biome));
|
||||
var biome = (Biome)serializer.Deserialize(stream);
|
||||
|
||||
// Add it to biome list
|
||||
biomes.Add(biome);
|
||||
Logger.Info("Loaded biome '{0}' from file '{1}'.", biome.Name, file);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Exception(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 82e9dc6ef4e61c2468a98567ff4d4a17
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e18c16459f0ad3b4aa2ce07825b41222
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
Reference in New Issue
Block a user