示例#1
0
 public override void Load(LoadObjectStore ObjectStore)
 {
     // read these at first, so we can initialize the free space and minimum/maximum per floor
     _HighestFloor = ObjectStore.LoadInt32Property("highest-floor");
     _LeftBorder   = ObjectStore.LoadInt32Property("left-border");
     _LowestFloor  = ObjectStore.LoadInt32Property("lowest-floor");
     _RightBorder  = ObjectStore.LoadInt32Property("right-border");
     _InitializeFreeSpaceAndMinimumMaximum();
     foreach (var BrokenThing in ObjectStore.LoadObjects("broken-things"))
     {
         _BrokenThings.Add(BrokenThing);
     }
     foreach (var Building in ObjectStore.LoadBuildings("buildings"))
     {
         _AddBuilding(Building);
     }
     _CatStock = ObjectStore.LoadUInt32Property("cat-stock");
     _Cents    = ObjectStore.LoadUInt64Property("cents");
     _Minutes  = ObjectStore.LoadDoubleProperty("minutes");
     _NextCatAtNumberOfEmployees = ObjectStore.LoadUInt32Property("next-cat-at-number-of-employees");
     foreach (var Person in ObjectStore.LoadPersons("persons"))
     {
         _AddPerson(Person);
     }
 }