Ejemplo n.º 1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
Ejemplo n.º 2
0
    public void Initialize(NurseManager nurseManager, TimeController timeController)
    {
        Initialize(Role.Nurse);
        this.nurseManager       = nurseManager;
        nurseManager.OnEnqueue += NurseManagerOnEnqueue;
        _timeController         = timeController;

        _timeController.OnHourIncrease   += OnHourIncrease;
        _timeController.OnMinuteIncrease += OnMinuteIncrease;
        MapController.Instance().OnFurnitureBuilt += OnFurnitureBuilt;
        _aiDestinationSetter = GetComponent <AIDestinationSetter>();
    }
Ejemplo n.º 3
0
        public void Initialize(Role role, TimeController timeController, NurseManager nurseManager,
                               PatientSpawnerManager patientSpawnerManager)
        {
            Initialize(role);
            patientData                    = ScriptableObject.CreateInstance <PatientData>();
            this.nurseManager              = nurseManager;
            this.timeController            = timeController;
            timeController.OnDayIncrease  += OnDayIncrease;
            timeController.OnHourIncrease += OnHourIncrease;

            covidRegressMultiplier  = 1;
            covidProgressMultiplier = 1;
            covidUnableToMoveAfter  = 0;

            patientData.OnLowComfort += PatientDataOnLowComfort;
            patientData.OnLowHunger  += PatientDataOnLowHunger;
            patientData.OnLowHygiene += PatientDataOnLowHygiene;
            patientData.OnLowToilet  += PatientDataOnLowToilet;

            MapController.Instance().OnFurnitureBuilt += OnFurnitureBuilt;

            _aiDestinationSetter       = GetComponent <AIDestinationSetter>();
            this.PatientSpawnerManager = patientSpawnerManager;
        }