private void Init() { _buildings = BuildingController.FindAllStructOfThisTypeAndFullyBuilt(_workType); if (_employ == -1) { _employ = MaxPeople(); } if (_oldEmploy != _employ && _oldEmploy != -1) { TakeActionOnNewNumber(); _employ = MaxPeople(); //update _employ and _oldEmply in my sibling UpdateEmploysOnMySibling(); } _oldEmploy = _employ; _currentText.text = _employ + ""; _totalText.text = "" + AbsMaxPeople() + ""; }
private void Init() { if (_buildings == null) { _buildings = BuildingController.FindAllStructOfThisTypeAndFullyBuilt(_workType); } if (_employ == -1) { _employ = MaxPeople(); } if (_oldEmploy != _employ && _oldEmploy != -1) { TakeActionOnNewNumber(); _employ = MaxPeople(); } _oldEmploy = _employ; _input.text = _employ + ""; _totalText.text = "" + AbsMaxPeople() + ""; }