Example #1
0
	IEnumerator UpdateWork(Building building) {
		Active = true;
		CurrentTime = Resource.Time;

		float konf = (((1.9f - (float)(Laborers.Count - 1) * 0.1f) / 2f) * (float)Laborers.Count);
		while (CurrentTime > 0) {
			CurrentTime -= Time.smoothDeltaTime * konf;
			yield return null;
		}

		building.EndWorker(this);

		Active = false;
	}