public Boolean HireJanitor(RectangleF Rectangle) { if (_Cents >= Data.JanitorHireCost) { var Desk = GetDesk(Rectangle.GetMidPoint()); if ((Desk != null) && (Desk.IsFree() == true)) { SpendMoney(Data.JanitorHireCost, Desk.GetMidLocation()); var Janitor = new Janitor(); Janitor.AssignDesk(Desk); _AddPerson(Janitor); if (_Persons.Count == _NextCatAtNumberOfEmployees) { _NextCatAtNumberOfEmployees += 20; _CatStock += 1; } return(true); } } return(false); }
public override void Load(LoadObjectStore ObjectStore) { base.Load(ObjectStore); _Computer = ObjectStore.LoadComputerProperty("computer"); _Janitor = ObjectStore.LoadJanitorProperty("janitor"); _Office = ObjectStore.LoadOfficeProperty("office"); _Person = ObjectStore.LoadPersonProperty("person"); _Rectangle = ObjectStore.LoadRectangleProperty("rectangle"); _TrashLevel = ObjectStore.LoadDoubleProperty("trash-level"); }
public void SetJanitor(Janitor Janitor) { _Janitor = Janitor; }