Beispiel #1
0
    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();
    }
Beispiel #2
0
 public void OnForceWork()
 {
     GameMetaManager.Employee.OnBackToWork();
     EmployeeStateController.ForceWorkAgain();
     EmployeeUIController.DisableAll();
 }