/// <summary> /// Generates a Mocked Employee. /// </summary> /// <returns>The Mocked Employee</returns> private EmployeeGeneratedData GenerateMockedEmployee() { EmployeeGeneratedData genData = new EmployeeGeneratedData(); genData.AssignRandomGender(); var employeeParts = Enum.GetValues(typeof(EmployeePart)); foreach (EmployeePart part in employeeParts) { genData.SetColorToPart(factory.GenerateColor(part), part); } return(genData); }
/// <summary> /// Generates new and random EmployeeData. /// </summary> /// <returns>The generated EmployeeData.</returns> public virtual EmployeeData GenerateRandomEmployee() { EmployeeData employee = new EmployeeData(); EmployeeGeneratedData generatedData = new EmployeeGeneratedData(); //Skills employee.Skills = GenerateSkills(); LevelUpSkills(employee.Skills); addSpecials(employee); //Color var employeeParts = Enum.GetValues(typeof(EmployeePart)); foreach (EmployeePart part in employeeParts) { generatedData.SetColorToPart(GenerateColor(part), part); } //Name generatedData.AssignRandomGender(); GenerateName(ref generatedData); //Set Salary and Prize employee.Salary = calcSalary(employee); employee.Prize = calcPrize(employee); //hireableDays employee.hireableDays = rnd.Next(1, 4); //AnimationClips int numDiffClips = contentHub.maleAnimationClips.Length / 3; int clipIndex = rnd.Next(numDiffClips); generatedData.idleClipIndex = clipIndex; generatedData.walkingClipIndex = clipIndex + numDiffClips; generatedData.workingClipIndex = clipIndex + 2 * numDiffClips; employee.generatedData = generatedData; employee.State = Enums.EmployeeState.PAUSED; return(employee); }