Пример #1
0
    void Awake()
    {
        materialUser  = GetComponent <MaterialUser>();
        unit          = GetComponent <Unit>();
        moneyUser     = GetComponent <MoneyUser>();
        workerSpender = GetComponent <WorkerSpender>();

        workerSpender.OnEffectivenessChanged.AddListener(RecalculateEffectiveness);
    }
Пример #2
0
    void Awake()
    {
        pollutionGenerator = GetComponent <PollutionGenerator>();
        wasteUser          = GetComponent <WasteUser>();
        materialUser       = GetComponent <MaterialUser>();
        moneyUser          = GetComponent <MoneyUser>();
        unit          = GetComponent <Unit>();
        workerSpender = GetComponent <WorkerSpender>();

        workerSpender.OnEffectivenessChanged.AddListener(CalculateValues);
    }
Пример #3
0
 void Awake()
 {
     moneyUser = GetComponent <MoneyUser>();
     unit      = GetComponent <Unit>();
     unit.OnTickEvent.AddListener(OnTick);
 }