예제 #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()
 {
     materialUser = GetComponent <MaterialUser>();
     unit         = GetComponent <Unit>();
     unit.OnTickEvent.AddListener(OnTick);
 }