Esempio n. 1
0
    public float CurrentTimeRateNorm;                                         ///

    void Awake()
    {
        consumablesNeed = depData.baseConsumablesNeed;           ///
        UpdateLabel();                                           ///

        resourcesChanged.AddListener(window.OnResourcesChanged); ///
        foreach (SelectionEvent se in selectionEvents)
        {
            selectionGroup?.RoomSelectionEvent.AddListener((RoomSelectionData sData) => { if (sData.type == se.type && sData.selected)
                                                                                          {
                                                                                              se.selectEvent.Invoke(sData);
                                                                                          }
                                                           });
            selectionGroup?.RoomSelectionEvent.AddListener((RoomSelectionData sData) => { if (sData.type == se.type && !sData.selected)
                                                                                          {
                                                                                              se.deselectEvent.Invoke(sData);
                                                                                          }
                                                           });
        }
        InitEvent.Invoke();                               ///
        foreach (WorkerController humanoid in _humanoids) ///
        {
            humanoid.gameObject.SetActive(false);
            humanoid.StartTransform = _resetPosition;
            humanoid.ForceTransform(_resetPosition);
        }


        pi  = new PerformanceIndicator(iParams.performanceName, 50, iParams.performanceRate); ///
        ri  = new RelevanceIndicator(iParams.relevanceName, 50, iParams.relevanceRate);
        rai = new RationalityIndicator(iParams.rationalityName, 50, iParams.rationalityRate);
        ci  = new ComfortIndicator(iParams.comfortName, 50, iParams.budgetExcessRate,
                                   iParams.consumablesLackRate, iParams.leavingRates);

        UpdateWindow(); ///
    }