2015-03-13 15:36:12 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Xml.Serialization;
|
|
|
|
|
using Assets.Scripts.Model.Config;
|
|
|
|
|
using TransportGame.Utils;
|
|
|
|
|
|
|
|
|
|
namespace TransportGame.Business
|
|
|
|
|
{
|
|
|
|
|
public static class ConfigurationManager
|
|
|
|
|
{
|
|
|
|
|
public static readonly string BiomeDirectory = "Assets\\Data\\Biomes";
|
|
|
|
|
public static readonly string ConfigurationDirectory = "Assets\\Data\\Config";
|
|
|
|
|
|
|
|
|
|
public static readonly string TerrGenConfigFile = "tergen.xml";
|
|
|
|
|
|
|
|
|
|
public static TerrainGeneratorConfig TerrGenConfig { get; private set; }
|
|
|
|
|
|
|
|
|
|
public static void LoadConfiguration()
|
|
|
|
|
{
|
|
|
|
|
// Load terrgen config
|
2015-05-22 08:26:29 +00:00
|
|
|
|
TerrGenConfig = SerializationHelper.DeserializeXml<TerrainGeneratorConfig>(Path.Combine(ConfigurationDirectory, TerrGenConfigFile));
|
2015-03-13 15:36:12 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|