Exemplo n.º 1
0
 private void AddListProperty <T>(int propertyIndex, string name) where T : IComparable <T>
 {
     if (properties.ContainsKey(propertyIndex))
     {
         throw new ArgumentException($"Property index {propertyIndex} being reused");
     }
     properties[propertyIndex] = new GameDataListProperty <T>(propertyIndex, name);
 }
Exemplo n.º 2
0
        public GameData()
        {
            properties             = new Dictionary <int, GameDataProperty>();
            resourceUsageTemplates = new Dictionary <int, ResourceUsageSpec>();
            resources            = new Dictionary <int, Resource>();
            jobs                 = new Dictionary <int, Job>();
            objectives           = new Dictionary <int, Objective>();
            VisualConsoleHistory = new ConsoleHistory();

            globalIndexCount = UserDefinedProperties;

            QueuedJobs  = new GameDataListProperty <Job>();
            RunningJobs = new GameDataListProperty <Job>();
        }