public void Init(OfficeDesk officeDesk, float happiness) { EmployeeStateController = GetComponent <EmployeeStateController>(); EmployeeStateController.Happiness = happiness; EmployeeMovementController = GetComponent <EmployeeMovementController>(); EmployeeUIController = Instantiate(employeeUIControllerPrefab); // EmployeeUIController.transform.SetParent(transform, false); // EmployeeUIController.GetComponent<Canvas>().worldCamera = GameMetaManager.Camera.Camera; EmployeeMovementController.Init(officeDesk, GetComponent <NavMeshController>(), GetComponent <EmployeeAnimationController>(), GetComponent <EmployeeParticlesController>()); EmployeeUIController.DisableAll(); EmployeeUIController.OnRequestAnswered += OnRequestAnswered; EmployeeUIController.OnForceWork += OnForceWork; EmployeeUIController.OnFired += OnFired; SetNextRequest(); }
public void OnForceWork() { GameMetaManager.Employee.OnBackToWork(); EmployeeStateController.ForceWorkAgain(); EmployeeUIController.DisableAll(); }