city-generation/Game/Assets/Scripts/Business/ConfigurationManager.cs

28 lines
851 B
C#
Raw Normal View History

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
TerrGenConfig = XmlHelper.Deserialize<TerrainGeneratorConfig>(Path.Combine(ConfigurationDirectory, TerrGenConfigFile));
}
}
}