Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 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");
 }
Esempio n. 3
0
 public void SetJanitor(Janitor Janitor)
 {
     _Janitor = Janitor;
 }