public DriverStatsProgressionManager()
    {
        Instance = this;

        try
        {
            var uri = new Uri("pack://application:,,,/Assets/Driver Stat Progression.txt");
            System.Windows.Resources.StreamResourceInfo resourceStream = Application.GetResourceStream(uri);

            using (var reader = new StreamReader(resourceStream.Stream))
            {
                string traitsText           = reader.ReadToEnd();
                List <DatabaseEntry> result = DatabaseReader.LoadFromText(traitsText);

                LoadDriverProgressionFromDatabase(result);
            }
        }
        catch (Exception e)
        {
            Console.WriteLine(e);
            //throw;
        }
    }
示例#2
0
    public Game()
    {
        instance = this;

        driverStatsProgressionManager = new DriverStatsProgressionManager();
    }