Exemplo n.º 1
0
 /// <summary>
 /// Adds all SpecialEmployees to the special EmployeesToSpawn List, iff all of their conditions are met and their are currently not
 /// hireable or hired. If they are an ExEmployee they must also have the recurring trade to be put in the List.
 /// </summary>
 public virtual void AddSpecialEmployees() =>
 specialEmployeesToSpawn.AddRange(contentHub.GetEmployeeLists().employeeList.FindAll(empDef =>
                                                                                     ConditionsMet(empDef) && !(employeeManager.GetData().employeesForHire
                                                                                                                .Any(empData => empData.EmployeeDefinition == empDef) ||
                                                                                                                employeeManager.GetData().hiredEmployees
                                                                                                                .Any(empData => empData.EmployeeDefinition == empDef) ||
                                                                                                                employeeManager.GetData().exEmplyoees
                                                                                                                .Any(empData => empData.EmployeeDefinition == empDef) && !empDef.Recurring)));
Exemplo n.º 2
0
        private void Awake()
        {
            contentHub            = ContentHub.Instance;
            NotificationManager   = NotificationManager.Instance;
            EmployeeToGuiMap      = new Dictionary <EmployeeData, GameObject>();
            this.specialEmployees = contentHub.GetEmployeeLists();
            factoryObject         = new EmployeeFactory();

            if (GameSettings.NewGame)
            {
                InitDefaultState();
            }
            else
            {
                LoadState();
            }

            bank              = contentHub.bank;
            dayChangedAction += DayChanged;
            GameTimeDayTickEvent.AddListener(dayChangedAction);
        }